summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-05-19 23:10:38 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-06-13 09:40:26 +0200
commitd2ed1074d051c870e7191d0a31f48fae9759e9d7 (patch)
tree5da6f8ee3e54b4dc93b38880067e657b767fa964 /tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
parent18e7e82d3f23a2a6954308c7a7c49ec23344b593 (diff)
tests: remove the last uses of Java-style iterators
... except where they are actually the component under test. Java-style iterators are scheduled for deprecation. Change-Id: If4399f7f74c5ffc0f7e65205e422edfa1d908ee8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp')
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 550d80501e..3e5f38d4bc 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -4147,10 +4147,10 @@ void tst_QNetworkReply::ioGetFromHttpWithCache()
request.setAttribute(QNetworkRequest::CacheSaveControlAttribute, false);
QFETCH(QStringList, extraHttpHeaders);
- QStringListIterator it(extraHttpHeaders);
- while (it.hasNext()) {
- QString header = it.next();
- QString value = it.next();
+ QVERIFY(extraHttpHeaders.size() % 2 == 0);
+ for (auto it = extraHttpHeaders.cbegin(), end = extraHttpHeaders.cend(); it != end; /*double-stepping*/) {
+ QString header = *it++;
+ QString value = *it++;
request.setRawHeader(header.toLatin1(), value.toLatin1()); // To latin1? Deal with it!
}