From ac83032c60094c500ecc879dd9eb9a5eb9ac876d Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 2 May 2019 19:34:48 +0200 Subject: [PATCH] tst_qrandomgenerator: replace QLinkedList with a std::list In preparation of deprecating QLinkedList. This actually simplifies the code, since std::list has a ctor from size, which QLinkedList lacks, and which the code worked around by using initializer_list. Change-Id: I07f9d590f863d9e4e00de73339cdfa27079f6e03 Reviewed-by: Thiago Macieira --- .../corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp index 7c04611823..64557f1460 100644 --- a/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp +++ b/tests/auto/corelib/global/qrandomgenerator/tst_qrandomgenerator.cpp @@ -511,7 +511,7 @@ void tst_QRandomGenerator::generateNonContiguous() QFETCH(uint, control); RandomGenerator rng(control); - QLinkedList list = { 0, 0, 0, 0, 0, 0, 0, 0 }; + std::list list(8); auto longerArrayCheck = [&] { QRandomGenerator().generate(list.begin(), list.end()); return find_if(list.begin(), list.end(), [&](quint64 cur) {