From 656e6ae9ea4a7981f6006fa14e30ce656cb39be5 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 11 May 2016 11:53:02 +0200 Subject: 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 --- src/network/network.pro | 2 +- src/network/ssl/qsslcontext_openssl.cpp | 2 +- 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 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 -- cgit v1.2.3