summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothlocaldevice_winrt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/qbluetoothlocaldevice_winrt.cpp')
-rw-r--r--src/bluetooth/qbluetoothlocaldevice_winrt.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bluetooth/qbluetoothlocaldevice_winrt.cpp b/src/bluetooth/qbluetoothlocaldevice_winrt.cpp
index 72cc4e6a..ec0787dd 100644
--- a/src/bluetooth/qbluetoothlocaldevice_winrt.cpp
+++ b/src/bluetooth/qbluetoothlocaldevice_winrt.cpp
@@ -465,16 +465,16 @@ static DeviceInformationCollection getAvailableAdapters()
DeviceInformationPairing pairingInfoFromAddress(const QBluetoothAddress &address)
{
const quint64 addr64 = address.toUInt64();
- BluetoothDevice device(nullptr);
- bool res = await(BluetoothDevice::FromBluetoothAddressAsync(addr64), device, 5000);
- if (res && device)
- return device.DeviceInformation().Pairing();
-
BluetoothLEDevice leDevice(nullptr);
- res = await(BluetoothLEDevice::FromBluetoothAddressAsync(addr64), leDevice, 5000);
+ bool res = await(BluetoothLEDevice::FromBluetoothAddressAsync(addr64), leDevice, 5000);
if (res && leDevice)
return leDevice.DeviceInformation().Pairing();
+ BluetoothDevice device(nullptr);
+ res = await(BluetoothDevice::FromBluetoothAddressAsync(addr64), device, 5000);
+ if (res && device)
+ return device.DeviceInformation().Pairing();
+
return nullptr;
}