diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2018-08-01 12:48:32 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2018-08-09 08:55:08 +0000 |
commit | 45c843ceca9fac1aa1246043730eaeeb3ed23235 (patch) | |
tree | 81e7e35b768ffa5443a3477fb4943df9f7fc5ec1 /src/bluetooth/qbluetoothsocket_android.cpp | |
parent | 80bea1f32b92c70c21c96762e31c726cb49e180f (diff) |
Shift close/abort signaling from QBluetoothSocket to private implementations
The private implementation can much more easily determine whether the
socket closure is already done or not.
On Bluez DBus, this avoids disconnected() being
emitted twice. Another platform that is still delayed is Android.
The patch permits the removal of Android specific ifdefs.
Last but not least the patch cleans up missing signals in WinRT.
Task-number: QTBUG-68550
Change-Id: I189e1dbc9f6d410522da1a82113fdf4fe79a4cbd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothsocket_android.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothsocket_android.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothsocket_android.cpp b/src/bluetooth/qbluetoothsocket_android.cpp index 9047bb31..5d0bf5fd 100644 --- a/src/bluetooth/qbluetoothsocket_android.cpp +++ b/src/bluetooth/qbluetoothsocket_android.cpp @@ -715,6 +715,9 @@ void QBluetoothSocketPrivateAndroid::abort() // Unconnected (now) in advance Q_Q(QBluetoothSocket); q->setSocketState(QBluetoothSocket::UnconnectedState); + q->setOpenMode(QIODevice::NotOpen); + emit q->readChannelFinished(); + emit q->disconnected(); } } } |