summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-11-24 13:54:44 +0100
committerTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-11-25 10:48:02 +0100
commit101327b369e035ab1f4fbc157e4c411b7db4a3c8 (patch)
treef1600b500d537c886e6d9230b716b3d0a1120357 /examples/bluetooth
parented7b872168020e1b3d22e1a475af00b7d5e252e6 (diff)
lowenergyscanned - update example (iOS and OS X)
With Core Bluetooth low energy controller must be created using device info, not address (which is invalid on OS X and iOS). Change-Id: I30cb3a061e2cd882981d7e65d636c63e57c36f8e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'examples/bluetooth')
-rw-r--r--examples/bluetooth/lowenergyscanner/device.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/bluetooth/lowenergyscanner/device.cpp b/examples/bluetooth/lowenergyscanner/device.cpp
index b9c8b532..c8cd17bd 100644
--- a/examples/bluetooth/lowenergyscanner/device.cpp
+++ b/examples/bluetooth/lowenergyscanner/device.cpp
@@ -166,7 +166,11 @@ void Device::scanServices(const QString &address)
//! [les-controller-1]
if (!controller) {
// Connecting signals and slots for connecting to LE services.
+#ifdef Q_OS_MAC
+ controller = new QLowEnergyController(currentDevice.getDevice());
+#else
controller = new QLowEnergyController(currentDevice.getDevice().address());
+#endif
connect(controller, SIGNAL(connected()),
this, SLOT(deviceConnected()));
connect(controller, SIGNAL(error(QLowEnergyController::Error)),