From 413d98ef936e86edc46fac41ece31e15f94c53ce Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Fri, 10 Oct 2014 10:57:37 +0200 Subject: Improve QBluetoothSocket::close() documentation The disconnected() and stateChanged() signals are delayed which may easily overlooked by API users. This change specifically points out this behavior difference. Change-Id: I3a9e9c656da50c9efe455cd2dbf903a2849e36da Task-number: QTBUG-41770 Reviewed-by: Leena Miettinen --- src/bluetooth/qbluetoothsocket.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/bluetooth/qbluetoothsocket.cpp b/src/bluetooth/qbluetoothsocket.cpp index be099622..9c3890aa 100644 --- a/src/bluetooth/qbluetoothsocket.cpp +++ b/src/bluetooth/qbluetoothsocket.cpp @@ -144,6 +144,10 @@ Q_DECLARE_LOGGING_CATEGORY(QT_BT_QNX) Aborts the current connection and resets the socket. Unlike disconnectFromService(), this function immediately closes the socket, discarding any pending data in the write buffer. + \note On Android, aborting the socket requires asynchronous interaction with Android threads. + Therefore the associated \l disconnected() and \l stateChanged() signals are delayed + until the threads have finished the closure. + \sa disconnectFromService(), close() */ @@ -151,6 +155,11 @@ Q_DECLARE_LOGGING_CATEGORY(QT_BT_QNX) \fn void QBluetoothSocket::close() Disconnects the socket's connection with the device. + + \note On Android, closing the socket requires asynchronous interaction with Android threads. + Therefore the associated \l disconnected() and \l stateChanged() signals are delayed + until the threads have finished the closure. + */ /*! -- cgit v1.2.3