From d33655a9531b750e1574742ff575f871c19ed808 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 6 Jul 2020 16:37:47 +0200 Subject: Use QList instead of QVector in other qtbase tests Task-number: QTBUG-84469 Change-Id: Ie0455c890c048c52eacad1badd6d21df999badf9 Reviewed-by: Friedemann Kleint --- .../tst_network_remote_stresstest.cpp | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'tests/manual/network_remote_stresstest') diff --git a/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp b/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp index f5c3bfde34..c7fd8b0cf3 100644 --- a/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp +++ b/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp @@ -27,15 +27,15 @@ ****************************************************************************/ #include -#include -#include #include +#include +#include #include -#include -#include -#include -#include +#include #include +#include +#include +#include #ifdef QT_BUILD_INTERNAL # include @@ -71,7 +71,7 @@ public: qint64 byteCounter; QNetworkAccessManager manager; - QVector httpUrls, httpsUrls, mixedUrls; + QList httpUrls, httpsUrls, mixedUrls; bool intermediateDebug; private: @@ -125,7 +125,7 @@ tst_NetworkRemoteStressTest::tst_NetworkRemoteStressTest() void tst_NetworkRemoteStressTest::initTestCase_data() { - QTest::addColumn >("urlList"); + QTest::addColumn>("urlList"); QTest::addColumn("useSslSocket"); QTest::newRow("no-ssl") << httpUrls << false; @@ -215,7 +215,7 @@ bool nativeSelect(int fd, int timeout, bool selectForWrite) void tst_NetworkRemoteStressTest::blockingSequentialRemoteHosts() { - QFETCH_GLOBAL(QVector, urlList); + QFETCH_GLOBAL(QList, urlList); QFETCH_GLOBAL(bool, useSslSocket); qint64 totalBytes = 0; @@ -280,7 +280,7 @@ void tst_NetworkRemoteStressTest::blockingSequentialRemoteHosts() void tst_NetworkRemoteStressTest::sequentialRemoteHosts() { - QFETCH_GLOBAL(QVector, urlList); + QFETCH_GLOBAL(QList, urlList); QFETCH_GLOBAL(bool, useSslSocket); #ifdef QT_NO_SSL @@ -354,7 +354,7 @@ void tst_NetworkRemoteStressTest::parallelRemoteHosts_data() void tst_NetworkRemoteStressTest::parallelRemoteHosts() { - QFETCH_GLOBAL(QVector, urlList); + QFETCH_GLOBAL(QList, urlList); QFETCH_GLOBAL(bool, useSslSocket); QFETCH(int, parallelAttempts); @@ -367,13 +367,13 @@ void tst_NetworkRemoteStressTest::parallelRemoteHosts() QElapsedTimer outerTimer; outerTimer.start(); - QVector::ConstIterator it = urlList.constBegin(); + auto it = urlList.constBegin(); while (it != urlList.constEnd()) { QElapsedTimer timeout; byteCounter = 0; timeout.start(); - QVector > sockets; + QList > sockets; sockets.reserve(parallelAttempts); for (int j = 0; j < parallelAttempts && it != urlList.constEnd(); ++j, ++it) { const QUrl &url = *it; @@ -449,7 +449,7 @@ void tst_NetworkRemoteStressTest::namRemoteGet_data() void tst_NetworkRemoteStressTest::namRemoteGet() { - QFETCH_GLOBAL(QVector, urlList); + QFETCH_GLOBAL(QList, urlList); QFETCH(int, parallelAttempts); bool pipelineAllowed = false;// QFETCH(bool, pipelineAllowed); @@ -458,7 +458,7 @@ void tst_NetworkRemoteStressTest::namRemoteGet() QElapsedTimer outerTimer; outerTimer.start(); - QVector::ConstIterator it = urlList.constBegin(); + auto it = urlList.constBegin(); while (it != urlList.constEnd()) { QElapsedTimer timeout; byteCounter = 0; @@ -467,7 +467,7 @@ void tst_NetworkRemoteStressTest::namRemoteGet() QNetworkRequest req; req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, pipelineAllowed); - QVector > replies; + QList > replies; replies.reserve(parallelAttempts); for (int j = 0; j < parallelAttempts && it != urlList.constEnd(); ++j) { req.setUrl(*it++); -- cgit v1.2.3