summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-05-11 11:53:02 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-05-12 21:42:05 +0000
commit656e6ae9ea4a7981f6006fa14e30ce656cb39be5 (patch)
tree1ec46b42ba1c092b9d08bdcef32bf1752077ff88
parentac2ccb1559c726f3b42473e915ef146714885213 (diff)
QtNetwork: port the last remaining Q_FOREACH loop and add QT_NO_FOREACH
Port the last remaining Q_FOREACH user in QtNetwork to C++11 range-for and mark the library as Q_FOREACH-free, using QT_NO_FOREACH. Change-Id: I8977f151e3575422fc1154677e035274c018d66f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
-rw-r--r--src/network/network.pro2
-rw-r--r--src/network/ssl/qsslcontext_openssl.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network.pro b/src/network/network.pro
index fed14616af..7a05f927c5 100644
--- a/src/network/network.pro
+++ b/src/network/network.pro
@@ -1,7 +1,7 @@
TARGET = QtNetwork
QT = core-private
-DEFINES += QT_NO_USING_NAMESPACE
+DEFINES += QT_NO_USING_NAMESPACE QT_NO_FOREACH
#DEFINES += QLOCALSERVER_DEBUG QLOCALSOCKET_DEBUG
#DEFINES += QNETWORKDISKCACHE_DEBUG
#DEFINES += QSSLSOCKET_DEBUG
diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
index ca296bd179..f132d0228c 100644
--- a/src/network/ssl/qsslcontext_openssl.cpp
+++ b/src/network/ssl/qsslcontext_openssl.cpp
@@ -207,7 +207,7 @@ init_context:
QList<QSslCipher> ciphers = sslContext->sslConfiguration.ciphers();
if (ciphers.isEmpty())
ciphers = QSslSocketPrivate::defaultCiphers();
- foreach (const QSslCipher &cipher, ciphers) {
+ for (const QSslCipher &cipher : qAsConst(ciphers)) {
if (first)
first = false;
else