diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-10-24 20:39:21 -0700 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-03 10:30:43 +0000 |
commit | 6efa28f0c193adf0151bb78d9660fa1fe6e8c525 (patch) | |
tree | 43394f38ede836a8161cc1d0053536ef0ade6cf8 /examples | |
parent | 4537a4b45f6344863271d9d780349491ac3449bf (diff) |
Update to new QRandomGenerator APIv5.10.0-beta4
Change-Id: I69f37f9304f24709a823fffd14e676c097712329
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/bluetooth/heartrate-game/devicehandler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/bluetooth/heartrate-game/devicehandler.cpp b/examples/bluetooth/heartrate-game/devicehandler.cpp index ab203c3f..3d263a4c 100644 --- a/examples/bluetooth/heartrate-game/devicehandler.cpp +++ b/examples/bluetooth/heartrate-game/devicehandler.cpp @@ -259,11 +259,11 @@ void DeviceHandler::updateDemoHR() { int randomValue = 0; if (m_currentValue < 30) { // Initial value - randomValue = 55 + QRandomGenerator::bounded(30); + randomValue = 55 + QRandomGenerator::global()->bounded(30); } else if (!m_measuring) { // Value when relax - randomValue = qBound(55, m_currentValue - 2 + QRandomGenerator::bounded(5), 75); + randomValue = qBound(55, m_currentValue - 2 + QRandomGenerator::global()->bounded(5), 75); } else { // Measuring - randomValue = m_currentValue + QRandomGenerator::bounded(10) - 2; + randomValue = m_currentValue + QRandomGenerator::global()->bounded(10) - 2; } addMeasurement(randomValue); |