diff options
author | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-05-07 14:03:23 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-05-12 09:00:45 +0000 |
commit | 193ed20a9d6f4b65fdffd4d3c43d7824eb450089 (patch) | |
tree | 08f42394b5fbc9d8a18acff92cd122f3b96e6d32 /examples/bluetooth/heartlistener/heartrate.cpp | |
parent | 26009d55b503e4bffbddf1f68530797ef81a1127 (diff) |
Reduce platform specific code lines
QLEController(QBluetoothAddress) ctor is not usable on iOS and OSX.
On those platforms we have to use QLECOntroller(QBluetoothDeviceInfo).
We mark the QBluetoothAddress based ctors of QLEController obsolete
and remove most uses of them. This cleans up some ifdefs throughout
the QtBluetooth code base.
Change-Id: Ibe1e3fa271a29461e39fc3c0eeba7a910a250077
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Diffstat (limited to 'examples/bluetooth/heartlistener/heartrate.cpp')
-rw-r--r-- | examples/bluetooth/heartlistener/heartrate.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/examples/bluetooth/heartlistener/heartrate.cpp b/examples/bluetooth/heartlistener/heartrate.cpp index b4496925..fe53a740 100644 --- a/examples/bluetooth/heartlistener/heartrate.cpp +++ b/examples/bluetooth/heartlistener/heartrate.cpp @@ -152,15 +152,7 @@ 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 + m_control = new QLowEnergyController(m_currentDevice.getDevice(), this); connect(m_control, SIGNAL(serviceDiscovered(QBluetoothUuid)), this, SLOT(serviceDiscovered(QBluetoothUuid))); connect(m_control, SIGNAL(discoveryFinished()), |