summaryrefslogtreecommitdiffstats
path: root/core/btdiscovery.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-19 06:15:30 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-19 06:21:23 -0700
commit08c2f5492af48e77f5f49d5768baf1dc045b9e8a (patch)
tree0de9ff1da2541f96272908c3cc46789ba57e73b6 /core/btdiscovery.cpp
parent0e865ef4e78e30b0294e6bb5d2ebab75cf545033 (diff)
downloadsubsurface-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.cpp5
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)