diff options
| author | Linus Jahn <lnj@kaidan.im> | 2019-05-14 17:15:11 +0200 |
|---|---|---|
| committer | LNJ <lnj@kaidan.im> | 2019-10-23 18:09:17 +0200 |
| commit | 4172b33b1222a586d95dbc7e69dad7a19a307ea1 (patch) | |
| tree | 830008c8dd42d257c8aba3080e35813d37383eb2 /src/base/QXmppStanza.cpp | |
| parent | b34ceca75db2791f00d9fa12b8714739bd19eade (diff) | |
| download | qxmpp-4172b33b1222a586d95dbc7e69dad7a19a307ea1.tar.gz | |
Replace Q_FOREACH (foreach) by C++11 ranged for-loops
Q_FOREACH is bad and will be deprecated in the future:
https://www.kdab.com/goodbye-q_foreach/
This also disables Q_FOREACH by defining QT_NO_FOREACH.
Diffstat (limited to 'src/base/QXmppStanza.cpp')
| -rw-r--r-- | src/base/QXmppStanza.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/base/QXmppStanza.cpp b/src/base/QXmppStanza.cpp index 22d0ce6e..3f37db14 100644 --- a/src/base/QXmppStanza.cpp +++ b/src/base/QXmppStanza.cpp @@ -637,13 +637,13 @@ void QXmppStanza::extensionsToXml(QXmlStreamWriter *xmlWriter) const if (!d->extendedAddresses.isEmpty()) { xmlWriter->writeStartElement("addresses"); xmlWriter->writeAttribute("xmlns", ns_extended_addressing); - foreach (const QXmppExtendedAddress &address, d->extendedAddresses) + for (const auto &address : d->extendedAddresses) address.toXml(xmlWriter); xmlWriter->writeEndElement(); } // other extensions - foreach (const QXmppElement &extension, d->extensions) + for (const auto &extension : d->extensions) extension.toXml(xmlWriter); } |
