diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-07-19 06:15:30 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-19 06:21:23 -0700 |
commit | 08c2f5492af48e77f5f49d5768baf1dc045b9e8a (patch) | |
tree | 0de9ff1da2541f96272908c3cc46789ba57e73b6 /core/btdiscovery.cpp | |
parent | 0e865ef4e78e30b0294e6bb5d2ebab75cf545033 (diff) | |
download | subsurface-08c2f5492af48e77f5f49d5768baf1dc045b9e8a.tar.gz |
BLE on iOS: use uuid instead of BT address
iOS doesn't give us an address of BT devices.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/btdiscovery.cpp')
-rw-r--r-- | core/btdiscovery.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp index e1893713d..cab44b4a6 100644 --- a/core/btdiscovery.cpp +++ b/core/btdiscovery.cpp @@ -174,8 +174,11 @@ QString markBLEAddress(const QBluetoothDeviceInfo *device) flags = device->coreConfigurations(); if (flags == QBluetoothDeviceInfo::LowEnergyCoreConfiguration) prefix = "LE:"; - +#if defined(Q_OS_IOS) + return prefix + device->deviceUuid().toString(); +#else return prefix + device->address().toString(); +#endif } void BTDiscovery::btDeviceDiscovered(const QBluetoothDeviceInfo &device) |