diff options
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_winrt.cpp')
-rw-r--r-- | src/bluetooth/qlowenergycontroller_winrt.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bluetooth/qlowenergycontroller_winrt.cpp b/src/bluetooth/qlowenergycontroller_winrt.cpp index f6cca42c..4beea12d 100644 --- a/src/bluetooth/qlowenergycontroller_winrt.cpp +++ b/src/bluetooth/qlowenergycontroller_winrt.cpp @@ -413,7 +413,11 @@ void QLowEnergyControllerPrivateWinRT::connectToDevice() setState(QLowEnergyController::UnconnectedState); return; } else { - Q_ASSERT_SUCCEEDED(hr); + qCWarning(QT_BT_WINRT) << "Connecting to device failed: " + << qt_error_string(hr); + setError(QLowEnergyController::ConnectionError); + setState(QLowEnergyController::UnconnectedState); + return; } ComPtr<ABI::Windows::Storage::Streams::IBuffer> buffer; hr = result->get_Value(&buffer); |