summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/heartlistener/heartrate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/heartlistener/heartrate.cpp')
-rw-r--r--examples/bluetooth/heartlistener/heartrate.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/bluetooth/heartlistener/heartrate.cpp b/examples/bluetooth/heartlistener/heartrate.cpp
index 91fe41c1..dd7371af 100644
--- a/examples/bluetooth/heartlistener/heartrate.cpp
+++ b/examples/bluetooth/heartlistener/heartrate.cpp
@@ -152,8 +152,15 @@ void HeartRate::connectToService(const QString &address)
}
//! [Connect signals]
+#ifdef Q_OS_MAC
+ // with CoreBluetooth controller requires QBluetoothDeviceInfo to connect:
+ m_control = new QLowEnergyController(m_currentDevice.getDevice(),
+ this);
+
+#else
m_control = new QLowEnergyController(m_currentDevice.getDevice().address(),
this);
+#endif
connect(m_control, SIGNAL(serviceDiscovered(QBluetoothUuid)),
this, SLOT(serviceDiscovered(QBluetoothUuid)));
connect(m_control, SIGNAL(discoveryFinished()),