summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qnetworkreplyhttpimpl.cpp2
-rw-r--r--src/network/access/qnetworkrequest.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp
index 32181bfd59..935c17dfc1 100644
--- a/src/network/access/qnetworkreplyhttpimpl.cpp
+++ b/src/network/access/qnetworkreplyhttpimpl.cpp
@@ -751,7 +751,7 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq
}
}
- foreach (const QByteArray &header, headers)
+ for (const QByteArray &header : qAsConst(headers))
httpRequest.setHeaderField(header, newHttpRequest.rawHeader(header));
if (newHttpRequest.attribute(QNetworkRequest::HttpPipeliningAllowedAttribute).toBool())
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index d1c2ff9f53..63332d4fd1 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -779,7 +779,7 @@ static QByteArray headerValue(QNetworkRequest::KnownHeaders header, const QVaria
QByteArray result;
bool first = true;
- foreach (const QNetworkCookie &cookie, cookies) {
+ for (const QNetworkCookie &cookie : qAsConst(cookies)) {
if (!first)
result += "; ";
first = false;
@@ -795,7 +795,7 @@ static QByteArray headerValue(QNetworkRequest::KnownHeaders header, const QVaria
QByteArray result;
bool first = true;
- foreach (const QNetworkCookie &cookie, cookies) {
+ for (const QNetworkCookie &cookie : qAsConst(cookies)) {
if (!first)
result += ", ";
first = false;