diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/bluetooth/btfiletransfer/progress.h | 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 | ||||
-rw-r--r-- | examples/nfc/annotatedurl/annotatedurl.h | 1 | ||||
-rw-r--r-- | examples/nfc/ndefeditor/mainwindow.h | 2 | ||||
-rw-r--r-- | examples/nfc/ndefeditor/mimeimagerecordeditor.h | 2 |
9 files changed, 5 insertions, 12 deletions
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/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..ab203c3f 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::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::bounded(5), 75); } else { // Measuring - randomValue = m_currentValue + qrand()%10 - 2; + randomValue = m_currentValue + QRandomGenerator::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> diff --git a/examples/nfc/annotatedurl/annotatedurl.h b/examples/nfc/annotatedurl/annotatedurl.h index 0fb1ae56..f4fe2ab9 100644 --- a/examples/nfc/annotatedurl/annotatedurl.h +++ b/examples/nfc/annotatedurl/annotatedurl.h @@ -51,7 +51,6 @@ #ifndef ANNOTATEDURL_H #define ANNOTATEDURL_H -#include <qnfcglobal.h> #include <QNdefMessage> #include <QtCore/QObject> diff --git a/examples/nfc/ndefeditor/mainwindow.h b/examples/nfc/ndefeditor/mainwindow.h index e16a44a4..ebdb24f0 100644 --- a/examples/nfc/ndefeditor/mainwindow.h +++ b/examples/nfc/ndefeditor/mainwindow.h @@ -53,8 +53,6 @@ #include <QMainWindow> -#include <qnfcglobal.h> - #include <qnearfieldtarget.h> QT_BEGIN_NAMESPACE diff --git a/examples/nfc/ndefeditor/mimeimagerecordeditor.h b/examples/nfc/ndefeditor/mimeimagerecordeditor.h index 9ea7d3b4..f6089d43 100644 --- a/examples/nfc/ndefeditor/mimeimagerecordeditor.h +++ b/examples/nfc/ndefeditor/mimeimagerecordeditor.h @@ -52,8 +52,6 @@ #ifndef MIMEIMAGERECORDEDITOR_H #define MIMEIMAGERECORDEDITOR_H -#include <qnfcglobal.h> - #include <QWidget> #include <qndefrecord.h> |