diff --git a/src/bluetooth/qbluetoothsocket.cpp b/src/bluetooth/qbluetoothsocket.cpp index 2f38ed0444c5c5b9f4cc8ac892d1707494d4c0cd..f8aa8ddf151f8425954c9c3bd3657d395535cc6b 100644 --- a/src/bluetooth/qbluetoothsocket.cpp +++ b/src/bluetooth/qbluetoothsocket.cpp @@ -112,6 +112,8 @@ Q_DECLARE_LOGGING_CATEGORY(QT_BT) supported on this platform. \value OperationError An operation was attempted while the socket was in a state that did not permit it. + \value RemoteHostClosedError The remote host closed the connection. This value was + introduced by Qt 5.10. */ /*! @@ -854,6 +856,9 @@ QDebug operator<<(QDebug debug, QBluetoothSocket::SocketError error) case QBluetoothSocket::HostNotFoundError: debug << "QBluetoothSocket::HostNotFoundError"; break; + case QBluetoothSocket::RemoteHostClosedError: + debug << "QBluetoothSocket::RemoteHostClosedError"; + break; case QBluetoothSocket::ServiceNotFoundError: debug << "QBluetoothSocket::ServiceNotFoundError"; break; diff --git a/src/bluetooth/qbluetoothsocket.h b/src/bluetooth/qbluetoothsocket.h index 97b6685bb5b092d26ba849652403c351e4226869..2b1bd3cf350e12ac506b66db61333cd77226df88 100644 --- a/src/bluetooth/qbluetoothsocket.h +++ b/src/bluetooth/qbluetoothsocket.h @@ -79,6 +79,7 @@ public: enum SocketError { NoSocketError = -2, UnknownSocketError = QAbstractSocket::UnknownSocketError, //-1 + RemoteHostClosedError = QAbstractSocket::RemoteHostClosedError, //1 HostNotFoundError = QAbstractSocket::HostNotFoundError, //2 ServiceNotFoundError = QAbstractSocket::SocketAddressNotAvailableError, //9 NetworkError = QAbstractSocket::NetworkError, //7 diff --git a/src/bluetooth/qbluetoothsocket_osx.mm b/src/bluetooth/qbluetoothsocket_osx.mm index 757128682f2186bca3798fa3b08c23d58aeedec8..cde987200f42a3e9ebae6cce2d85c6c523eee540 100644 --- a/src/bluetooth/qbluetoothsocket_osx.mm +++ b/src/bluetooth/qbluetoothsocket_osx.mm @@ -761,6 +761,9 @@ QDebug operator<<(QDebug debug, QBluetoothSocket::SocketError error) case QBluetoothSocket::HostNotFoundError: debug << "QBluetoothSocket::HostNotFoundError"; break; + case QBluetoothSocket::RemoteHostClosedError: + debug << "QBluetoothSocket::RemoteHostClosedError"; + break; case QBluetoothSocket::ServiceNotFoundError: debug << "QBluetoothSocket::ServiceNotFoundError"; break; diff --git a/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp b/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp index 7dbb15562708ecbef0a0a5c23a4c0469d57adb9c..0d5a5eaed7492e001d4c8ea11d036b32357aa50d 100644 --- a/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp +++ b/src/imports/bluetooth/qdeclarativebluetoothsocket.cpp @@ -244,6 +244,7 @@ void QDeclarativeBluetoothSocket::setConnected(bool connected) \li \c{ServiceNotFoundError} \li \c{NetworkError} \li \c{UnsupportedProtocolError} + \li \c{RemoteHostClosedError} \endlist The errors are derived from \l QBluetoothSocket::SocketError. This property is read-only. diff --git a/src/imports/bluetooth/qdeclarativebluetoothsocket_p.h b/src/imports/bluetooth/qdeclarativebluetoothsocket_p.h index faa2c29c9e1bcaca89d0e25f469ee97ef1dea4da..e5092d2ca78894a70d738af18e0751854a439876 100644 --- a/src/imports/bluetooth/qdeclarativebluetoothsocket_p.h +++ b/src/imports/bluetooth/qdeclarativebluetoothsocket_p.h @@ -78,6 +78,7 @@ public: enum Error { NoError = QBluetoothSocket::NoSocketError, UnknownSocketError = QBluetoothSocket::UnknownSocketError, + RemoteHostClosedError = QBluetoothSocket::RemoteHostClosedError, HostNotFoundError = QBluetoothSocket::HostNotFoundError, ServiceNotFoundError = QBluetoothSocket::ServiceNotFoundError, NetworkError = QBluetoothSocket::NetworkError,