diff options
Diffstat (limited to 'src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp index ae8e9184..30aa3fcc 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_winrt.cpp @@ -440,8 +440,11 @@ void QWinRTBluetoothDeviceDiscoveryWorker::classicBluetoothInfoFromDeviceIdAsync hr = deviceFromIdOperation->put_Completed(Callback<IAsyncOperationCompletedHandler<BluetoothDevice *>> ([thisPointer](IAsyncOperation<BluetoothDevice *> *op, AsyncStatus status) { - if (status == Completed && thisPointer) - thisPointer->onPairedClassicBluetoothDeviceFoundAsync(op, status); + if (thisPointer) { + if (status == Completed) + thisPointer->onPairedClassicBluetoothDeviceFoundAsync(op, status); + --thisPointer->m_pendingPairedDevices; + } return S_OK; }).Get()); if (FAILED(hr)) { @@ -474,8 +477,11 @@ void QWinRTBluetoothDeviceDiscoveryWorker::leBluetoothInfoFromDeviceIdAsync(HSTR hr = deviceFromIdOperation->put_Completed(Callback<IAsyncOperationCompletedHandler<BluetoothLEDevice *>> ([thisPointer] (IAsyncOperation<BluetoothLEDevice *> *op, AsyncStatus status) { - if (status == Completed && thisPointer) - thisPointer->onPairedBluetoothLEDeviceFoundAsync(op, status); + if (thisPointer) { + if (status == Completed) + thisPointer->onPairedBluetoothLEDeviceFoundAsync(op, status); + --thisPointer->m_pendingPairedDevices; + } return S_OK; }).Get()); if (FAILED(hr)) { |