aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/QXmppElement.cpp')
-rw-r--r--src/base/QXmppElement.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/base/QXmppElement.cpp b/src/base/QXmppElement.cpp
index cbc5920b..a1275dbe 100644
--- a/src/base/QXmppElement.cpp
+++ b/src/base/QXmppElement.cpp
@@ -45,8 +45,9 @@ QXmppElementPrivate::QXmppElementPrivate(const QDomElement &element)
attributes.insert(attr.name(), attr.value());
}
- QDomNode childNode = element.firstChild();
- while (!childNode.isNull()) {
+ for (auto childNode = element.firstChild();
+ !childNode.isNull();
+ childNode = childNode.nextSibling()) {
if (childNode.isElement()) {
QXmppElementPrivate *child = new QXmppElementPrivate(childNode.toElement());
child->parent = this;
@@ -54,7 +55,6 @@ QXmppElementPrivate::QXmppElementPrivate(const QDomElement &element)
} else if (childNode.isText()) {
value += childNode.toText().data();
}
- childNode = childNode.nextSibling();
}
QTextStream stream(&serializedSource);