diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-06-12 16:01:04 -0700 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-07-04 11:46:00 +0000 |
commit | dbb55fba566fd3878b5ef76a2216f0c3f961147f (patch) | |
tree | 0c6f4a7a5cfb7dcfa41c88b205ddb155530b228d /tests/manual/openglseriestest/mainwindow.cpp | |
parent | 94f565a00cbc8d779251355cdb94704277711da7 (diff) |
Use QRandomGenerator instead of q?rand
Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/manual/openglseriestest/mainwindow.cpp')
-rw-r--r-- | tests/manual/openglseriestest/mainwindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/manual/openglseriestest/mainwindow.cpp b/tests/manual/openglseriestest/mainwindow.cpp index 4aaeed13..2d59f18c 100644 --- a/tests/manual/openglseriestest/mainwindow.cpp +++ b/tests/manual/openglseriestest/mainwindow.cpp @@ -36,6 +36,7 @@ #include <QtCharts/QDateTimeAxis> #include <QtCharts/QCategoryAxis> #include <QtCharts/QChart> +#include <QtCore/QRandomGenerator> #include <QtCore/QDebug> #include <QtCore/QDateTime> @@ -548,7 +549,7 @@ void MainWindow::addSeries(bool gl) if (m_seriesList.size() < maxSeriesCount) { QXYSeries *series; - if (qrand() % 2) { + if (QRandomGenerator::bounded(2)) { series = new QLineSeries; series->setPen(QPen(QBrush(color), width)); } else { |