From c97f492563c08bba58ec405afe03b6d8c92d5271 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Mon, 9 Aug 2021 11:50:05 +0200 Subject: [PATCH] Compare based on uuid --- libnymea-app/wifisetup/bluetoothdiscovery.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libnymea-app/wifisetup/bluetoothdiscovery.cpp b/libnymea-app/wifisetup/bluetoothdiscovery.cpp index 92ea906f..9c8d262c 100644 --- a/libnymea-app/wifisetup/bluetoothdiscovery.cpp +++ b/libnymea-app/wifisetup/bluetoothdiscovery.cpp @@ -180,13 +180,12 @@ 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()) { + if (di->bluetoothDeviceInfo().deviceUuid() == deviceInfo.deviceUuid()) { di->setBluetoothDeviceInfo(deviceInfo); return; } } - BluetoothDeviceInfo *deviceInformation = new BluetoothDeviceInfo(deviceInfo); qCDebug(dcBtWiFiSetup) << "BluetoothDiscovery: [+]" << deviceInformation->name() << "(" << deviceInformation->address() << ")" << (deviceInformation->isLowEnergy() ? "LE" : "") << deviceInfo.serviceUuids(); m_deviceInfos->addBluetoothDeviceInfo(deviceInformation);