From 14599af2f27292710e68a6e500aa9f9cf3a30789 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 21 Sep 2017 12:23:48 -0700 Subject: Update to new QRandomGenerator API To get latest qtbase dev integrated in qt5 dev again without qtdeclarative 5.10->dev merge. Change-Id: I6905649aca2b06302df8cee2f660f1f92398d36a Reviewed-by: Erik Verbruggen (cherry picked from commit ee00fa01dc41deaaedfa0d1d5cc6cd750bfe75f4) Reviewed-by: Lars Knoll --- tests/auto/quick/qquicklistview/randomsortmodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/quick/qquicklistview') diff --git a/tests/auto/quick/qquicklistview/randomsortmodel.cpp b/tests/auto/quick/qquicklistview/randomsortmodel.cpp index 7c4bd5111c..7375fe0dbe 100644 --- a/tests/auto/quick/qquicklistview/randomsortmodel.cpp +++ b/tests/auto/quick/qquicklistview/randomsortmodel.cpp @@ -74,14 +74,14 @@ QVariant RandomSortModel::data(const QModelIndex& index, int role) const void RandomSortModel::randomize() { - const int row = QRandomGenerator::bounded(mData.count()); + const int row = QRandomGenerator::global()->bounded(mData.count()); int random; bool exists = false; // Make sure we won't end up with two items with the same weight, as that // would make unit-testing much harder do { exists = false; - random = QRandomGenerator::bounded(mData.count() * 10); + random = QRandomGenerator::global()->bounded(mData.count() * 10); QList >::ConstIterator iter, end; for (iter = mData.constBegin(), end = mData.constEnd(); iter != end; ++iter) { if ((*iter).second == random) { -- cgit v1.2.3