From 4172b33b1222a586d95dbc7e69dad7a19a307ea1 Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Tue, 14 May 2019 17:15:11 +0200 Subject: 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. --- src/client/QXmppOutgoingClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client/QXmppOutgoingClient.cpp') diff --git a/src/client/QXmppOutgoingClient.cpp b/src/client/QXmppOutgoingClient.cpp index 3a454e79..6c8b5e62 100644 --- a/src/client/QXmppOutgoingClient.cpp +++ b/src/client/QXmppOutgoingClient.cpp @@ -470,7 +470,7 @@ void QXmppOutgoingClient::handleStanza(const QDomElement &nodeRecv) // determine SASL Authentication mechanism to use QStringList commonMechanisms; QString usedMechanism; - foreach (const QString &mechanism, supportedMechanisms) { + for (const auto &mechanism : qAsConst(supportedMechanisms)) { if (features.authMechanisms().contains(mechanism)) commonMechanisms << mechanism; } -- cgit v1.2.3