From 989fca660c3556fa957ed9a3f7cd3b948a4166a2 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 6 Jul 2020 16:15:23 +0200 Subject: Use QList instead of QVector in corelib tests Task-number: QTBUG-84469 Change-Id: Ic80fde5517aed363f17d0da55cadcc958c3c8895 Reviewed-by: Friedemann Kleint --- tests/auto/corelib/global/qglobal/tst_qglobal.cpp | 4 ++-- tests/auto/corelib/global/qhooks/tst_qhooks.cpp | 2 +- tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/auto/corelib/global') diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp index 4cfbdbde37..3c4bd3840e 100644 --- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp +++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp @@ -93,7 +93,7 @@ void tst_QGlobal::qIsNull() void tst_QGlobal::for_each() { - QVector list; + QList list; list << 0 << 1 << 2 << 3 << 4 << 5; int counter = 0; @@ -112,7 +112,7 @@ void tst_QGlobal::for_each() // check whether we can pass a constructor as container argument counter = 0; - foreach (int i, QVector(list)) { + foreach (int i, QList(list)) { QCOMPARE(i, counter++); } QCOMPARE(counter, list.count()); diff --git a/tests/auto/corelib/global/qhooks/tst_qhooks.cpp b/tests/auto/corelib/global/qhooks/tst_qhooks.cpp index 5fa7566e86..c06b9e7e3d 100644 --- a/tests/auto/corelib/global/qhooks/tst_qhooks.cpp +++ b/tests/auto/corelib/global/qhooks/tst_qhooks.cpp @@ -81,7 +81,7 @@ void tst_QHooks::testAddRemoveObject() QCOMPARE(objectCount, 0); } -static QVector hookOrder; +static QList hookOrder; static QHooks::AddQObjectCallback existingAddHook = 0; static QHooks::RemoveQObjectCallback existingRemoveHook = 0; diff --git a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp index 1c6e013adb..da0accad69 100644 --- a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp +++ b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp @@ -27,9 +27,9 @@ ****************************************************************************/ #include +#include #include #include -#include #include #include @@ -621,7 +621,7 @@ void tst_QRandomGenerator::boundedQuality() { // test the quality of the generator - QVector buffer(BufferCount, 0xcdcdcdcd); + QList buffer(BufferCount, 0xcdcdcdcd); generate(buffer.begin(), buffer.end(), [&] { return rng.bounded(Bound); }); for (quint32 value : qAsConst(buffer)) { -- cgit v1.2.3