From 6efa28f0c193adf0151bb78d9660fa1fe6e8c525 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 24 Oct 2017 20:39:21 -0700 Subject: Update to new QRandomGenerator API Change-Id: I69f37f9304f24709a823fffd14e676c097712329 Reviewed-by: Timur Pocheptsov Reviewed-by: Alex Blasche --- examples/bluetooth/heartrate-game/devicehandler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') 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); -- cgit v1.2.3