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:
Dirk Hohndel 2017-09-16 20:15:15 -07:00
parent 08e4d2dc5e
commit 5695ef956b

View file

@ -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)