summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qnetworkproxy_win.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-01-26 14:38:54 +0100
committerMarc Mutz <marc.mutz@kdab.com>2016-04-25 07:38:50 +0000
commit036b40403260c4b5de256e8118a90ec04538a312 (patch)
tree87f81334e76f82c080c3168534e13293f50ed2bb /src/network/kernel/qnetworkproxy_win.cpp
parenta1dec825f9aa9d7f86d740fd420f1c084463f507 (diff)
QtNetwork: eradicate Q_FOREACH loops [already const]
... (or trivially marked const) local variables or parameters, by replacing them with C++11 range-for loops. Also ported one indexed loop. Change-Id: Idddcac48ce7527b1ea674671ceb9aaf4d31fb42e Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/network/kernel/qnetworkproxy_win.cpp')
-rw-r--r--src/network/kernel/qnetworkproxy_win.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp
index fe9f088062..0838227123 100644
--- a/src/network/kernel/qnetworkproxy_win.cpp
+++ b/src/network/kernel/qnetworkproxy_win.cpp
@@ -194,7 +194,7 @@ static bool isBypassed(const QString &host, const QStringList &bypassList)
return true;
// does it match the list of exclusions?
- foreach (const QString &entry, bypassList) {
+ for (const QString &entry : bypassList) {
if (entry == QLatin1String("<local>")) {
if (isSimple)
return true;
@@ -241,7 +241,7 @@ static QList<QNetworkProxy> filterProxyListByCapabilities(const QList<QNetworkPr
break;
}
QList<QNetworkProxy> result;
- foreach (const QNetworkProxy& proxy, proxyList) {
+ for (const QNetworkProxy &proxy : proxyList) {
if (proxy.capabilities() & requiredCaps)
result.append(proxy);
}
@@ -251,7 +251,7 @@ static QList<QNetworkProxy> filterProxyListByCapabilities(const QList<QNetworkPr
static QList<QNetworkProxy> removeDuplicateProxies(const QList<QNetworkProxy> &proxyList)
{
QList<QNetworkProxy> result;
- foreach (QNetworkProxy proxy, proxyList) {
+ for (const QNetworkProxy &proxy : proxyList) {
bool append = true;
for (int i=0; i < result.count(); i++) {
if (proxy.hostName() == result.at(i).hostName()
@@ -283,7 +283,7 @@ static QList<QNetworkProxy> parseServerList(const QNetworkProxyQuery &query, con
QHash<QString, QNetworkProxy> taggedProxies;
const QString requiredTag = query.protocolTag();
bool checkTags = !requiredTag.isEmpty() && query.queryType() != QNetworkProxyQuery::TcpServer; //windows tags are only for clients
- foreach (const QString &entry, proxyList) {
+ for (const QString &entry : proxyList) {
int server = 0;
QNetworkProxy::ProxyType proxyType = QNetworkProxy::HttpProxy;