diff options
Diffstat (limited to 'examples/bluetooth')
-rw-r--r-- | examples/bluetooth/btchat/btchat.pro | 1 | ||||
-rw-r--r-- | examples/bluetooth/btfiletransfer/btfiletransfer.pro | 1 | ||||
-rw-r--r-- | examples/bluetooth/btfiletransfer/progress.h | 1 | ||||
-rw-r--r-- | examples/bluetooth/btscanner/btscanner.pro | 1 | ||||
-rw-r--r-- | examples/bluetooth/btscanner/device.h | 1 | ||||
-rw-r--r-- | examples/bluetooth/btscanner/service.h | 1 | ||||
-rw-r--r-- | examples/bluetooth/heartrate-game/devicehandler.cpp | 7 | ||||
-rw-r--r-- | examples/bluetooth/lowenergyscanner/device.cpp | 1 | ||||
-rw-r--r-- | examples/bluetooth/lowenergyscanner/device.h | 1 |
9 files changed, 8 insertions, 7 deletions
diff --git a/examples/bluetooth/btchat/btchat.pro b/examples/bluetooth/btchat/btchat.pro index 6ecae4c7..9c37dfcf 100644 --- a/examples/bluetooth/btchat/btchat.pro +++ b/examples/bluetooth/btchat/btchat.pro @@ -2,6 +2,7 @@ TEMPLATE = app TARGET = btchat QT = core bluetooth widgets +requires(qtConfig(listwidget)) android: QT += androidextras SOURCES = \ diff --git a/examples/bluetooth/btfiletransfer/btfiletransfer.pro b/examples/bluetooth/btfiletransfer/btfiletransfer.pro index e5d47302..92b81bef 100644 --- a/examples/bluetooth/btfiletransfer/btfiletransfer.pro +++ b/examples/bluetooth/btfiletransfer/btfiletransfer.pro @@ -2,6 +2,7 @@ TEMPLATE = app TARGET = btfiletransfer QT = core bluetooth widgets +requires(qtConfig(filedialog)) SOURCES = \ main.cpp \ diff --git a/examples/bluetooth/btfiletransfer/progress.h b/examples/bluetooth/btfiletransfer/progress.h index 6dc9d6be..64a19ca0 100644 --- a/examples/bluetooth/btfiletransfer/progress.h +++ b/examples/bluetooth/btfiletransfer/progress.h @@ -52,7 +52,6 @@ #define PROGRESS_H #include <QDialog> -#include <qbluetoothglobal.h> #include <QTime> QT_FORWARD_DECLARE_CLASS(QBluetoothTransferReply) diff --git a/examples/bluetooth/btscanner/btscanner.pro b/examples/bluetooth/btscanner/btscanner.pro index f1254629..904ea5a8 100644 --- a/examples/bluetooth/btscanner/btscanner.pro +++ b/examples/bluetooth/btscanner/btscanner.pro @@ -1,6 +1,7 @@ TARGET = btscanner QT = core bluetooth widgets +requires(qtConfig(listwidget)) TEMPLATE = app SOURCES = \ diff --git a/examples/bluetooth/btscanner/device.h b/examples/bluetooth/btscanner/device.h index a8202898..7111e1ec 100644 --- a/examples/bluetooth/btscanner/device.h +++ b/examples/bluetooth/btscanner/device.h @@ -53,7 +53,6 @@ #include "ui_device.h" -#include <qbluetoothglobal.h> #include <qbluetoothlocaldevice.h> #include <QDialog> diff --git a/examples/bluetooth/btscanner/service.h b/examples/bluetooth/btscanner/service.h index 83b4bf42..94748dad 100644 --- a/examples/bluetooth/btscanner/service.h +++ b/examples/bluetooth/btscanner/service.h @@ -53,7 +53,6 @@ #include "ui_service.h" -#include <qbluetoothglobal.h> #include <QDialog> QT_FORWARD_DECLARE_CLASS(QBluetoothAddress) diff --git a/examples/bluetooth/heartrate-game/devicehandler.cpp b/examples/bluetooth/heartrate-game/devicehandler.cpp index ec83586b..3d263a4c 100644 --- a/examples/bluetooth/heartrate-game/devicehandler.cpp +++ b/examples/bluetooth/heartrate-game/devicehandler.cpp @@ -52,6 +52,7 @@ #include "devicehandler.h" #include "deviceinfo.h" #include <QtEndian> +#include <QRandomGenerator> DeviceHandler::DeviceHandler(QObject *parent) : BluetoothBaseClass(parent), @@ -258,11 +259,11 @@ void DeviceHandler::updateDemoHR() { int randomValue = 0; if (m_currentValue < 30) { // Initial value - randomValue = 55 + qrand()%30; + randomValue = 55 + QRandomGenerator::global()->bounded(30); } else if (!m_measuring) { // Value when relax - randomValue = qBound(55, m_currentValue - 2 + qrand()%5, 75); + randomValue = qBound(55, m_currentValue - 2 + QRandomGenerator::global()->bounded(5), 75); } else { // Measuring - randomValue = m_currentValue + qrand()%10 - 2; + randomValue = m_currentValue + QRandomGenerator::global()->bounded(10) - 2; } addMeasurement(randomValue); diff --git a/examples/bluetooth/lowenergyscanner/device.cpp b/examples/bluetooth/lowenergyscanner/device.cpp index 77314256..2ae30c16 100644 --- a/examples/bluetooth/lowenergyscanner/device.cpp +++ b/examples/bluetooth/lowenergyscanner/device.cpp @@ -50,6 +50,7 @@ ****************************************************************************/ #include "device.h" + #include <qbluetoothaddress.h> #include <qbluetoothdevicediscoveryagent.h> #include <qbluetoothlocaldevice.h> diff --git a/examples/bluetooth/lowenergyscanner/device.h b/examples/bluetooth/lowenergyscanner/device.h index 6dbfa948..a30cf9b6 100644 --- a/examples/bluetooth/lowenergyscanner/device.h +++ b/examples/bluetooth/lowenergyscanner/device.h @@ -51,7 +51,6 @@ #ifndef DEVICE_H #define DEVICE_H -#include <qbluetoothglobal.h> #include <qbluetoothlocaldevice.h> #include <QObject> #include <QVariant> |