summaryrefslogtreecommitdiffstats
path: root/src/bluetooth
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2017-07-07 11:07:36 +0200
committerAlex Blasche <alexander.blasche@qt.io>2017-07-10 05:51:55 +0000
commit1a6a18b9132e8b82d3b91f9ccbd7405599003fe3 (patch)
treecc166a98bd23baed654a2e7e58cd7f76db1e2a2c /src/bluetooth
parente93517592f6a1e08d3019c0e425fbf47df4dab25 (diff)
Add support for QBluetoothSocket::RemoteHostClosedError on Win UWP
Change-Id: I6503377cd99d403ff31a2eae8109476294cbebac Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/bluetooth')
-rw-r--r--src/bluetooth/qbluetoothsocket_winrt.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothsocket_winrt.cpp b/src/bluetooth/qbluetoothsocket_winrt.cpp
index 4a9d1b93..4e2bc11c 100644
--- a/src/bluetooth/qbluetoothsocket_winrt.cpp
+++ b/src/bluetooth/qbluetoothsocket_winrt.cpp
@@ -223,7 +223,7 @@ public:
// the closing of the socket won't be communicated to the caller. So only the error is set. The
// actual socket close happens inside of read.
if (!bufferLength) {
- emit socketErrorOccured(QBluetoothSocket::NetworkError);
+ emit socketErrorOccured(QBluetoothSocket::RemoteHostClosedError);
return S_OK;
}
@@ -594,6 +594,9 @@ void QBluetoothSocketPrivate::handleError(QBluetoothSocket::SocketError error)
case QBluetoothSocket::NetworkError:
errorString = QBluetoothSocket::tr("Network error");
break;
+ case QBluetoothSocket::RemoteHostClosedError:
+ errorString = QBluetoothSocket::tr("Remote host closed connection");
+ break;
default:
errorString = QBluetoothSocket::tr("Unknown socket error");
}