summaryrefslogtreecommitdiff
path: root/examples/bluetooth/heartrate-game/devicefinder.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/heartrate-game/devicefinder.h')
-rw-r--r--examples/bluetooth/heartrate-game/devicefinder.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/examples/bluetooth/heartrate-game/devicefinder.h b/examples/bluetooth/heartrate-game/devicefinder.h
index 860e6066..3766ee5f 100644
--- a/examples/bluetooth/heartrate-game/devicefinder.h
+++ b/examples/bluetooth/heartrate-game/devicefinder.h
@@ -6,13 +6,16 @@
#include "bluetoothbaseclass.h"
-#include <QBluetoothDeviceDiscoveryAgent>
-#include <QBluetoothDeviceInfo>
+#include <QtBluetooth/qbluetoothdevicediscoveryagent.h>
-#include <qqml.h>
+#include <QtCore/qtimer.h>
+#include <QtCore/qvariant.h>
-#include <QTimer>
-#include <QVariant>
+#include <QtQmlIntegration/qqmlintegration.h>
+
+QT_BEGIN_NAMESPACE
+class QBluetoothDeviceInfo;
+QT_END_NAMESPACE
class DeviceInfo;
class DeviceHandler;
@@ -25,6 +28,7 @@ class DeviceFinder: public BluetoothBaseClass
Q_PROPERTY(QVariant devices READ devices NOTIFY devicesChanged)
QML_ELEMENT
+ QML_UNCREATABLE("This class is not intended to be created directly")
public:
DeviceFinder(DeviceHandler *handler, QObject *parent = nullptr);
@@ -38,7 +42,7 @@ public slots:
void connectToService(const QString &address);
private slots:
- void addDevice(const QBluetoothDeviceInfo&);
+ void addDevice(const QBluetoothDeviceInfo &device);
void scanError(QBluetoothDeviceDiscoveryAgent::Error error);
void scanFinished();