diff options
Diffstat (limited to 'src/bluetooth/qbluetoothsocket_winrt.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothsocket_winrt.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothsocket_winrt.cpp b/src/bluetooth/qbluetoothsocket_winrt.cpp index 501ffd74..ec511974 100644 --- a/src/bluetooth/qbluetoothsocket_winrt.cpp +++ b/src/bluetooth/qbluetoothsocket_winrt.cpp @@ -40,6 +40,9 @@ #include "qbluetoothsocket.h" #include "qbluetoothsocket_p.h" +#ifdef CLASSIC_APP_BUILD +#define Q_OS_WINRT +#endif #include <qfunctions_winrt.h> #include <private/qeventdispatcher_winrt_p.h> @@ -223,7 +226,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; } @@ -609,6 +612,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"); } |