Fix BT duplicate BT discovery results on iOS

pull/631/head
Michael Zanetti 2021-08-08 00:53:53 +02:00
parent f250cdbbc0
commit 4080b8d71f
2 changed files with 1 additions and 6 deletions

View File

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

View File

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