summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/heartrate-game/devicefinder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/heartrate-game/devicefinder.cpp')
-rw-r--r--examples/bluetooth/heartrate-game/devicefinder.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/bluetooth/heartrate-game/devicefinder.cpp b/examples/bluetooth/heartrate-game/devicefinder.cpp
index 0579ad4a..71c4dcee 100644
--- a/examples/bluetooth/heartrate-game/devicefinder.cpp
+++ b/examples/bluetooth/heartrate-game/devicefinder.cpp
@@ -58,7 +58,7 @@ DeviceFinder::DeviceFinder(DeviceHandler *handler, QObject *parent):
connect(m_deviceDiscoveryAgent, &QBluetoothDeviceDiscoveryAgent::canceled, this, &DeviceFinder::scanFinished);
-#ifdef Q_OS_WIN32
+#ifdef SIMULATOR
m_demoTimer.setSingleShot(true);
m_demoTimer.setInterval(2000);
connect(&m_demoTimer, &QTimer::timeout, this, &DeviceFinder::scanFinished);
@@ -80,7 +80,7 @@ void DeviceFinder::startSearch()
emit devicesChanged();
-#ifdef Q_OS_WIN32
+#ifdef SIMULATOR
m_demoTimer.start();
#else
m_deviceDiscoveryAgent->start();
@@ -111,7 +111,7 @@ void DeviceFinder::scanError(QBluetoothDeviceDiscoveryAgent::Error error)
void DeviceFinder::scanFinished()
{
-#ifdef Q_OS_WIN32
+#ifdef SIMULATOR
// Only for testing
for (int i = 0; i < 5; i++)
m_devices.append(new DeviceInfo(QBluetoothDeviceInfo()));
@@ -146,7 +146,7 @@ void DeviceFinder::connectToService(const QString &address)
bool DeviceFinder::scanning() const
{
-#ifdef Q_OS_WIN32
+#ifdef SIMULATOR
return m_demoTimer.isActive();
#else
return m_deviceDiscoveryAgent->isActive();