summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2018-08-14 11:12:21 +0200
committerOliver Wolff <oliver.wolff@qt.io>2018-08-16 06:46:46 +0000
commitbfb696f799cb9495dc8fdf227f366a76bdcf97e4 (patch)
tree937f256c4241ef2679f02afed89e3f3972d52f90 /src
parent0b5da60094a1c38c5bbbef6564656e870eebb14a (diff)
winrt: Add missing error handling in connectToServiceHelper
QBluetoothSocketPrivateWinRT::connectToServiceHelper was missing one hr check. Change-Id: Iae357df99881874b2d672dde6625e36d6221de0f Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/bluetooth/qbluetoothsocket_winrt.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothsocket_winrt.cpp b/src/bluetooth/qbluetoothsocket_winrt.cpp
index b4ffc61c..79dccdd6 100644
--- a/src/bluetooth/qbluetoothsocket_winrt.cpp
+++ b/src/bluetooth/qbluetoothsocket_winrt.cpp
@@ -394,13 +394,14 @@ void QBluetoothSocketPrivateWinRT::connectToServiceHelper(const QBluetoothAddres
q->setSocketState(QBluetoothSocket::ConnectingState);
requestedOpenMode = openMode;
- QEventDispatcherWinRT::runOnXamlThread([this]() {
+ hr = QEventDispatcherWinRT::runOnXamlThread([this]() {
HRESULT hr;
hr = m_connectOp->put_Completed(Callback<IAsyncActionCompletedHandler>(
this, &QBluetoothSocketPrivateWinRT::handleConnectOpFinished).Get());
RETURN_HR_IF_FAILED("connectToHostByName: Could not register \"connectOp\" callback");
return S_OK;
});
+ Q_ASSERT_SUCCEEDED(hr);
}
void QBluetoothSocketPrivateWinRT::connectToService(