Fix BT duplicate BT discovery results on iOS
parent
f250cdbbc0
commit
4080b8d71f
|
|
@ -48,13 +48,7 @@ BluetoothDeviceInfo::~BluetoothDeviceInfo()
|
|||
|
||||
QString BluetoothDeviceInfo::address() const
|
||||
{
|
||||
#ifdef Q_OS_MAC
|
||||
// On OS X and iOS we do not have addresses,
|
||||
// only unique UUIDs generated by Core Bluetooth.
|
||||
return m_deviceInfo.deviceUuid().toString();
|
||||
#else
|
||||
return m_deviceInfo.address().toString();
|
||||
#endif
|
||||
}
|
||||
|
||||
QString BluetoothDeviceInfo::name() const
|
||||
|
|
|
|||
|
|
@ -178,6 +178,7 @@ void BluetoothDiscovery::onBluetoothHostModeChanged(const QBluetoothLocalDevice:
|
|||
|
||||
void BluetoothDiscovery::deviceDiscovered(const QBluetoothDeviceInfo &deviceInfo)
|
||||
{
|
||||
qCDebug(dcBtWiFiSetup()) << "BluetoothDiscovery: Device discovered:" << deviceInfo.address().toString() << deviceInfo.deviceUuid();
|
||||
foreach (BluetoothDeviceInfo *di, m_deviceInfos->deviceInfos()) {
|
||||
if (di->address() == deviceInfo.address().toString()) {
|
||||
di->setBluetoothDeviceInfo(deviceInfo);
|
||||
|
|
|
|||
Loading…
Reference in New Issue