summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Buhr <andreas@andreasbuhr.de>2021-03-16 17:42:43 +0100
committerAndreas Buhr <andreas@andreasbuhr.de>2021-03-22 13:47:46 +0100
commit1b07519f6ca912c0c6334b96d26c61fd8b216a6e (patch)
tree2127e17dc92e9352b1a8c13b3b168686f5145ebc
parentfbda5f09c7317de47e83fa2d643d6babe10a06db (diff)
Fix bug: Let QBluetoothsocket::close emit disconnected only once
QBluetoothSocket::close emitted "disconnected" twice on macOS. The first emit is by setSocketState(UnconnectedState). This patch fixes the behavior to only emit it once. Fixes: QTBUG-91164 Change-Id: I7147a28b40c49db947ee97a4f1a14f319da341d1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 2a6ab855c2a4ffc5253126d53bc667b0076dd9c9) Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/bluetooth/qbluetoothsocket_osx.mm1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothsocket_osx.mm b/src/bluetooth/qbluetoothsocket_osx.mm
index 70ed87ca..7259aeb5 100644
--- a/src/bluetooth/qbluetoothsocket_osx.mm
+++ b/src/bluetooth/qbluetoothsocket_osx.mm
@@ -540,7 +540,6 @@ void QBluetoothSocketPrivate::channelClosed()
q_ptr->setSocketState(QBluetoothSocket::UnconnectedState);
q_ptr->setOpenMode(QIODevice::NotOpen);
emit q_ptr->readChannelFinished();
- emit q_ptr->disconnected();
} else {
state = QBluetoothSocket::UnconnectedState;
// We are still in connectToService and do not want