aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppByteStreamIq.cpp
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2019-05-14 17:15:11 +0200
committerLNJ <lnj@kaidan.im>2019-10-23 18:09:17 +0200
commit4172b33b1222a586d95dbc7e69dad7a19a307ea1 (patch)
tree830008c8dd42d257c8aba3080e35813d37383eb2 /src/base/QXmppByteStreamIq.cpp
parentb34ceca75db2791f00d9fa12b8714739bd19eade (diff)
downloadqxmpp-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/QXmppByteStreamIq.cpp')
-rw-r--r--src/base/QXmppByteStreamIq.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/base/QXmppByteStreamIq.cpp b/src/base/QXmppByteStreamIq.cpp
index 57c3c8c2..2501d9f2 100644
--- a/src/base/QXmppByteStreamIq.cpp
+++ b/src/base/QXmppByteStreamIq.cpp
@@ -162,8 +162,7 @@ void QXmppByteStreamIq::toXmlElementFromChild(QXmlStreamWriter *writer) const
else if (m_mode == Udp)
modeStr = "udp";
helperToXmlAddAttribute(writer, "mode", modeStr);
- foreach (const StreamHost& streamHost, m_streamHosts)
- {
+ for (const auto &streamHost : m_streamHosts) {
writer->writeStartElement("streamhost");
helperToXmlAddAttribute(writer, "host", streamHost.host());
helperToXmlAddAttribute(writer, "jid", streamHost.jid());