aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlchangeset
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-09-21 12:23:48 -0700
committerLars Knoll <lars.knoll@qt.io>2017-12-05 10:05:01 +0000
commit14599af2f27292710e68a6e500aa9f9cf3a30789 (patch)
tree024e6545c682796f64159112988dede312b68f00 /tests/auto/qml/qqmlchangeset
parent1dbe0acecbc286b6df25fe2a9c4a373fa0d6b11e (diff)
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 <erik.verbruggen@qt.io> (cherry picked from commit ee00fa01dc41deaaedfa0d1d5cc6cd750bfe75f4) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlchangeset')
-rw-r--r--tests/auto/qml/qqmlchangeset/tst_qqmlchangeset.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/qml/qqmlchangeset/tst_qqmlchangeset.cpp b/tests/auto/qml/qqmlchangeset/tst_qqmlchangeset.cpp
index 65ac1ef320..f12c3432c2 100644
--- a/tests/auto/qml/qqmlchangeset/tst_qqmlchangeset.cpp
+++ b/tests/auto/qml/qqmlchangeset/tst_qqmlchangeset.cpp
@@ -1487,27 +1487,27 @@ void tst_qqmlchangeset::random()
for (int j = 0; j < combinations; ++j) {
QQmlChangeSet set;
for (int k = 0; k < depth; ++k) {
- switch (-QRandomGenerator::bounded(3)) {
+ switch (-QRandomGenerator::global()->bounded(3)) {
case InsertOp: {
- int index = QRandomGenerator::bounded(modelCount + 1);
- int count = QRandomGenerator::bounded(5) + 1;
+ int index = QRandomGenerator::global()->bounded(modelCount + 1);
+ int count = QRandomGenerator::global()->bounded(5) + 1;
set.insert(index, count);
input.append(Insert(index, count));
modelCount += count;
break;
}
case RemoveOp: {
- const int index = QRandomGenerator::bounded(modelCount + 1);
- const int count = QRandomGenerator::bounded(modelCount - index + 1);
+ const int index = QRandomGenerator::global()->bounded(modelCount + 1);
+ const int count = QRandomGenerator::global()->bounded(modelCount - index + 1);
set.remove(index, count);
input.append(Remove(index, count));
modelCount -= count;
break;
}
case MoveOp: {
- const int from = QRandomGenerator::bounded(modelCount + 1);
- const int count = QRandomGenerator::bounded(modelCount - from + 1);
- const int to = QRandomGenerator::bounded(modelCount - count + 1);
+ const int from = QRandomGenerator::global()->bounded(modelCount + 1);
+ const int count = QRandomGenerator::global()->bounded(modelCount - from + 1);
+ const int to = QRandomGenerator::global()->bounded(modelCount - count + 1);
const int moveId = moveCount++;
set.move(from, to, count, moveId);
input.append(Move(from, to, count, moveId));