diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-07-06 16:37:47 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-07-07 11:48:45 +0200 |
commit | d33655a9531b750e1574742ff575f871c19ed808 (patch) | |
tree | 8b90d1878dd5f0d9ea38bc048b22f718273bb802 /tests/manual/network_remote_stresstest | |
parent | a02d2d3f22acbf9afb349964f5da00d0e91af887 (diff) |
Use QList instead of QVector in other qtbase tests
Task-number: QTBUG-84469
Change-Id: Ie0455c890c048c52eacad1badd6d21df999badf9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/manual/network_remote_stresstest')
-rw-r--r-- | tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
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 <QtTest/QtTest> -#include <QtCore/QThread> -#include <QtCore/QSemaphore> #include <QtCore/QElapsedTimer> +#include <QtCore/QList> +#include <QtCore/QSemaphore> #include <QtCore/QSharedPointer> -#include <QtCore/QVector> -#include <QtNetwork/QTcpSocket> -#include <QtNetwork/QSslSocket> -#include <QtNetwork/QNetworkReply> +#include <QtCore/QThread> #include <QtNetwork/QNetworkAccessManager> +#include <QtNetwork/QNetworkReply> +#include <QtNetwork/QSslSocket> +#include <QtNetwork/QTcpSocket> #ifdef QT_BUILD_INTERNAL # include <private/qnetworkaccessmanager_p.h> @@ -71,7 +71,7 @@ public: qint64 byteCounter; QNetworkAccessManager manager; - QVector<QUrl> httpUrls, httpsUrls, mixedUrls; + QList<QUrl> httpUrls, httpsUrls, mixedUrls; bool intermediateDebug; private: @@ -125,7 +125,7 @@ tst_NetworkRemoteStressTest::tst_NetworkRemoteStressTest() void tst_NetworkRemoteStressTest::initTestCase_data() { - QTest::addColumn<QVector<QUrl> >("urlList"); + QTest::addColumn<QList<QUrl>>("urlList"); QTest::addColumn<bool>("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<QUrl>, urlList); + QFETCH_GLOBAL(QList<QUrl>, urlList); QFETCH_GLOBAL(bool, useSslSocket); qint64 totalBytes = 0; @@ -280,7 +280,7 @@ void tst_NetworkRemoteStressTest::blockingSequentialRemoteHosts() void tst_NetworkRemoteStressTest::sequentialRemoteHosts() { - QFETCH_GLOBAL(QVector<QUrl>, urlList); + QFETCH_GLOBAL(QList<QUrl>, 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<QUrl>, urlList); + QFETCH_GLOBAL(QList<QUrl>, urlList); QFETCH_GLOBAL(bool, useSslSocket); QFETCH(int, parallelAttempts); @@ -367,13 +367,13 @@ void tst_NetworkRemoteStressTest::parallelRemoteHosts() QElapsedTimer outerTimer; outerTimer.start(); - QVector<QUrl>::ConstIterator it = urlList.constBegin(); + auto it = urlList.constBegin(); while (it != urlList.constEnd()) { QElapsedTimer timeout; byteCounter = 0; timeout.start(); - QVector<QSharedPointer<QTcpSocket> > sockets; + QList<QSharedPointer<QTcpSocket> > 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<QUrl>, urlList); + QFETCH_GLOBAL(QList<QUrl>, urlList); QFETCH(int, parallelAttempts); bool pipelineAllowed = false;// QFETCH(bool, pipelineAllowed); @@ -458,7 +458,7 @@ void tst_NetworkRemoteStressTest::namRemoteGet() QElapsedTimer outerTimer; outerTimer.start(); - QVector<QUrl>::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<QSharedPointer<QNetworkReply> > replies; + QList<QSharedPointer<QNetworkReply> > replies; replies.reserve(parallelAttempts); for (int j = 0; j < parallelAttempts && it != urlList.constEnd(); ++j) { req.setUrl(*it++); |