diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-09-21 12:22:31 -0700 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-03 09:12:25 +0000 |
commit | 6867324cb02bb34c8fabd610ea5d3476c09dabe1 (patch) | |
tree | 2ab63f7b74895f8eb8427a42011e7ef78b501e9c /tests/manual/itemmodeltest | |
parent | ee68813c81d5c3d40af6d362f851d54099bf86f6 (diff) |
Update to new QRandomGenerator API
Change-Id: I69f37f9304f24709a823fffd14e676c097712329
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'tests/manual/itemmodeltest')
-rw-r--r-- | tests/manual/itemmodeltest/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/manual/itemmodeltest/main.cpp b/tests/manual/itemmodeltest/main.cpp index 9ccf6ede..6cb97fc8 100644 --- a/tests/manual/itemmodeltest/main.cpp +++ b/tests/manual/itemmodeltest/main.cpp @@ -202,7 +202,7 @@ void GraphDataGenerator::addRow() QModelIndex index = m_tableWidget->model()->index(0, i); m_tableWidget->model()->setData(index, ((float)i / (float)m_columnCount) / 2.0f - + QRandomGenerator::bounded(30.0 / 100.0f)); + + QRandomGenerator::global()->bounded(30.0 / 100.0f)); } m_tableWidget->resizeColumnsToContents(); } @@ -235,7 +235,7 @@ void GraphDataGenerator::fixTableSize() void GraphDataGenerator::changeSelectedButtonClicked() { // Change all selected cells to a random value 1-10 - QVariant value = QVariant::fromValue(QRandomGenerator::bounded(10.0) + 1); + QVariant value = QVariant::fromValue(QRandomGenerator::global()->bounded(10.0) + 1); QList<QTableWidgetItem *> selectedItems = m_tableWidget->selectedItems(); foreach (QTableWidgetItem *item, selectedItems) { QString oldData = item->data(Qt::DisplayRole).toString(); |