diff --git a/tests/auto/algorithm/tst_algorithm.cpp b/tests/auto/algorithm/tst_algorithm.cpp index ca45200c36d..614cf3fa123 100644 --- a/tests/auto/algorithm/tst_algorithm.cpp +++ b/tests/auto/algorithm/tst_algorithm.cpp @@ -101,13 +101,13 @@ void tst_Algorithm::transform() // QSet to QList const QSet strings({QString("1"), QString("3"), QString("132")}); QList i1 = Utils::transform(strings, [](const QString &s) { return s.toInt(); }); - qSort(i1); + Utils::sort(i1); QCOMPARE(i1, QList({1, 3, 132})); QList i2 = Utils::transform(strings, stringToInt); - qSort(i2); + Utils::sort(i2); QCOMPARE(i2, QList({1, 3, 132})); QList i3 = Utils::transform(strings, &QString::size); - qSort(i3); + Utils::sort(i3); QCOMPARE(i3, QList({1, 1, 3})); } } diff --git a/tests/auto/mapreduce/tst_mapreduce.cpp b/tests/auto/mapreduce/tst_mapreduce.cpp index 832715659f4..aaa80de424d 100644 --- a/tests/auto/mapreduce/tst_mapreduce.cpp +++ b/tests/auto/mapreduce/tst_mapreduce.cpp @@ -204,7 +204,7 @@ void tst_MapReduce::map() ).waitForFinished(); // Utils::map is "ordered" by default, but that means that result reporting is ordered, // the map function is still called out-of-order - qSort(results); + Utils::sort(results); QCOMPARE(results, QList({1, 2, 5})); } { @@ -224,7 +224,7 @@ void tst_MapReduce::map() QLatin1String("bar"), QLatin1String("blah")}), [](const QString &s) { return s.size(); }); QList vals = sizes.toList(); - qSort(vals); + Utils::sort(vals); QCOMPARE(vals, QList({3, 4})); } { @@ -232,7 +232,7 @@ void tst_MapReduce::map() const QSet sizes = Utils::mapped(list.cbegin(), list.cend(), [](const QString &s) { return s.size(); }); QList vals = sizes.toList(); - qSort(vals); + Utils::sort(vals); QCOMPARE(vals, QList({3, 4})); } }