summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2018-04-26 08:59:00 +0200
committerAlex Blasche <alexander.blasche@qt.io>2018-05-04 12:09:33 +0000
commitdb58c8691d9a0d6f9ee9226658b0fd6508a52c12 (patch)
treee27c15aeb2fcc75abba21d48611f4c7216f2046d
parentef332e4deedc914fe33bab68107f902182e03356 (diff)
Add missing emission of readChannelFinished()
This fixes the problem for all supported platforms. Task-number: QTBUG-67672 Change-Id: I9cecfbe8a73df46070293eba1870ea3bee738b7b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-rw-r--r--src/bluetooth/qbluetoothsocket.cpp2
-rw-r--r--src/bluetooth/qbluetoothsocket_android.cpp1
-rw-r--r--src/bluetooth/qbluetoothsocket_osx.mm3
3 files changed, 6 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothsocket.cpp b/src/bluetooth/qbluetoothsocket.cpp
index c5b0f7d3..1ad3ffc2 100644
--- a/src/bluetooth/qbluetoothsocket.cpp
+++ b/src/bluetooth/qbluetoothsocket.cpp
@@ -742,6 +742,7 @@ void QBluetoothSocket::abort()
#ifndef QT_ANDROID_BLUETOOTH
//Android closes when the Java event loop comes around
setSocketState(QBluetoothSocket::UnconnectedState);
+ emit readChannelFinished();
emit disconnected();
#endif
}
@@ -827,6 +828,7 @@ void QBluetoothSocket::close()
#ifndef QT_ANDROID_BLUETOOTH
//Android closes when the Java event loop comes around
setSocketState(UnconnectedState);
+ emit readChannelFinished();
emit disconnected();
#endif
}
diff --git a/src/bluetooth/qbluetoothsocket_android.cpp b/src/bluetooth/qbluetoothsocket_android.cpp
index d0b901ae..a70b95a2 100644
--- a/src/bluetooth/qbluetoothsocket_android.cpp
+++ b/src/bluetooth/qbluetoothsocket_android.cpp
@@ -779,6 +779,7 @@ void QBluetoothSocketPrivate::inputThreadError(int errorCode)
q->setSocketState(QBluetoothSocket::UnconnectedState);
q->setOpenMode(QIODevice::NotOpen);
+ emit q->readChannelFinished();
emit q->disconnected();
}
diff --git a/src/bluetooth/qbluetoothsocket_osx.mm b/src/bluetooth/qbluetoothsocket_osx.mm
index de7e2120..dec542dd 100644
--- a/src/bluetooth/qbluetoothsocket_osx.mm
+++ b/src/bluetooth/qbluetoothsocket_osx.mm
@@ -351,6 +351,7 @@ void QBluetoothSocketPrivate::channelClosed()
if (!isConnecting) {
q_ptr->setSocketState(QBluetoothSocket::UnconnectedState);
q_ptr->setOpenMode(QIODevice::NotOpen);
+ emit q_ptr->readChannelFinished();
emit q_ptr->disconnected();
} else {
state = QBluetoothSocket::UnconnectedState;
@@ -638,6 +639,7 @@ void QBluetoothSocket::abort()
d_ptr->abort();
setSocketState(QBluetoothSocket::UnconnectedState);
+ emit readChannelFinished();
emit disconnected();
}
@@ -726,6 +728,7 @@ void QBluetoothSocket::close()
d_ptr->close();
setSocketState(UnconnectedState);
+ emit readChannelFinished();
emit disconnected();
}