mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
BLE: if there's no address, use the UUID instead
This is not just for IOS, the same applies on a Mac. But I see no issue with enabling that for all OSs. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
08e4d2dc5e
commit
5695ef956b
1 changed files with 4 additions and 5 deletions
|
@ -174,11 +174,10 @@ 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
|
||||
if (device->address().isNull())
|
||||
return prefix + device->deviceUuid().toString();
|
||||
else
|
||||
return prefix + device->address().toString();
|
||||
}
|
||||
|
||||
void BTDiscovery::btDeviceDiscovered(const QBluetoothDeviceInfo &device)
|
||||
|
|
Loading…
Add table
Reference in a new issue