mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 02:23:25 +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();
|
flags = device->coreConfigurations();
|
||||||
if (flags == QBluetoothDeviceInfo::LowEnergyCoreConfiguration)
|
if (flags == QBluetoothDeviceInfo::LowEnergyCoreConfiguration)
|
||||||
prefix = "LE:";
|
prefix = "LE:";
|
||||||
#if defined(Q_OS_IOS)
|
if (device->address().isNull())
|
||||||
return prefix + device->deviceUuid().toString();
|
return prefix + device->deviceUuid().toString();
|
||||||
#else
|
else
|
||||||
return prefix + device->address().toString();
|
return prefix + device->address().toString();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BTDiscovery::btDeviceDiscovered(const QBluetoothDeviceInfo &device)
|
void BTDiscovery::btDeviceDiscovered(const QBluetoothDeviceInfo &device)
|
||||||
|
|
Loading…
Add table
Reference in a new issue