summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/thread
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-07-06 16:15:23 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-07-07 11:48:45 +0200
commit989fca660c3556fa957ed9a3f7cd3b948a4166a2 (patch)
tree8479b302afd3458cd2583dffc9e5dc52e512d9a1 /tests/auto/corelib/thread
parentd33655a9531b750e1574742ff575f871c19ed808 (diff)
Use QList instead of QVector in corelib tests
Task-number: QTBUG-84469 Change-Id: Ic80fde5517aed363f17d0da55cadcc958c3c8895 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/auto/corelib/thread')
-rw-r--r--tests/auto/corelib/thread/qfuture/tst_qfuture.cpp6
-rw-r--r--tests/auto/corelib/thread/qpromise/snippet_qpromise.cpp2
-rw-r--r--tests/auto/corelib/thread/qresultstore/tst_qresultstore.cpp8
-rw-r--r--tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp4
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp4
5 files changed, 12 insertions, 12 deletions
diff --git a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
index 7a94908f6b..40abe3d762 100644
--- a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
+++ b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
@@ -191,8 +191,8 @@ void tst_QFuture::resultStore()
QVERIFY(it == store.end());
}
- QVector<int> vec0 = QVector<int>() << 2 << 3;
- QVector<int> vec1 = QVector<int>() << 4 << 5;
+ QList<int> vec0 = QList<int>() << 2 << 3;
+ QList<int> vec1 = QList<int>() << 4 << 5;
{
ResultStoreInt store;
@@ -1728,7 +1728,7 @@ void tst_QFuture::nonGlobalThreadPool()
const int numTasks = QThread::idealThreadCount();
- QVector<QFuture<int> > futures;
+ QList<QFuture<int>> futures;
futures.reserve(numTasks);
for (int i = 0; i < numTasks; ++i)
diff --git a/tests/auto/corelib/thread/qpromise/snippet_qpromise.cpp b/tests/auto/corelib/thread/qpromise/snippet_qpromise.cpp
index 4825ee80d5..571078feba 100644
--- a/tests/auto/corelib/thread/qpromise/snippet_qpromise.cpp
+++ b/tests/auto/corelib/thread/qpromise/snippet_qpromise.cpp
@@ -194,7 +194,7 @@ void snippet_QPromise::suspendExample()
thread->wait();
QCOMPARE(future.resultCount(), 100);
- QVector<int> expected(100);
+ QList<int> expected(100);
std::iota(expected.begin(), expected.end(), 0);
QCOMPARE(future.results(), expected);
}
diff --git a/tests/auto/corelib/thread/qresultstore/tst_qresultstore.cpp b/tests/auto/corelib/thread/qresultstore/tst_qresultstore.cpp
index fba617e34d..5b545fe37a 100644
--- a/tests/auto/corelib/thread/qresultstore/tst_qresultstore.cpp
+++ b/tests/auto/corelib/thread/qresultstore/tst_qresultstore.cpp
@@ -57,8 +57,8 @@ private:
int int0;
int int1;
int int2;
- QVector<int> vec0;
- QVector<int> vec1;
+ QList<int> vec0;
+ QList<int> vec1;
};
void tst_QtConcurrentResultStore::init()
@@ -66,8 +66,8 @@ void tst_QtConcurrentResultStore::init()
int0 = 0;
int1 = 1;
int2 = 2;
- vec0 = QVector<int>() << 2 << 3;
- vec1 = QVector<int>() << 4 << 5;
+ vec0 = QList<int> { 2, 3 };
+ vec1 = QList<int> { 4, 5 };
}
void tst_QtConcurrentResultStore::construction()
diff --git a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
index b7134d0454..7654d0e74b 100644
--- a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
+++ b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
@@ -166,7 +166,7 @@ void tst_QSemaphore::multiRelease()
};
QSemaphore sem;
- QVector<Thread *> threads;
+ QList<Thread *> threads;
threads.resize(4);
for (Thread *&t : threads)
@@ -200,7 +200,7 @@ void tst_QSemaphore::multiAcquireRelease()
};
QSemaphore sem;
- QVector<Thread *> threads;
+ QList<Thread *> threads;
threads.resize(4);
for (Thread *&t : threads)
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index b5520ac9bb..f72fec0362 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -883,7 +883,7 @@ void tst_QThread::adoptMultipleThreads()
#else
const int numThreads = 5;
#endif
- QVector<NativeThreadWrapper*> nativeThreads;
+ QList<NativeThreadWrapper*> nativeThreads;
SignalRecorder recorder;
@@ -915,7 +915,7 @@ void tst_QThread::adoptMultipleThreadsOverlap()
#else
const int numThreads = 5;
#endif
- QVector<NativeThreadWrapper*> nativeThreads;
+ QList<NativeThreadWrapper*> nativeThreads;
SignalRecorder recorder;