Fix BT duplicate BT discovery results on iOS
This commit is contained in:
parent
f250cdbbc0
commit
4080b8d71f
@ -48,13 +48,7 @@ BluetoothDeviceInfo::~BluetoothDeviceInfo()
|
|||||||
|
|
||||||
QString BluetoothDeviceInfo::address() const
|
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();
|
return m_deviceInfo.address().toString();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString BluetoothDeviceInfo::name() const
|
QString BluetoothDeviceInfo::name() const
|
||||||
|
|||||||
@ -178,6 +178,7 @@ void BluetoothDiscovery::onBluetoothHostModeChanged(const QBluetoothLocalDevice:
|
|||||||
|
|
||||||
void BluetoothDiscovery::deviceDiscovered(const QBluetoothDeviceInfo &deviceInfo)
|
void BluetoothDiscovery::deviceDiscovered(const QBluetoothDeviceInfo &deviceInfo)
|
||||||
{
|
{
|
||||||
|
qCDebug(dcBtWiFiSetup()) << "BluetoothDiscovery: Device discovered:" << deviceInfo.address().toString() << deviceInfo.deviceUuid();
|
||||||
foreach (BluetoothDeviceInfo *di, m_deviceInfos->deviceInfos()) {
|
foreach (BluetoothDeviceInfo *di, m_deviceInfos->deviceInfos()) {
|
||||||
if (di->address() == deviceInfo.address().toString()) {
|
if (di->address() == deviceInfo.address().toString()) {
|
||||||
di->setBluetoothDeviceInfo(deviceInfo);
|
di->setBluetoothDeviceInfo(deviceInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user