summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothsocket_osx.mm
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2018-07-25 14:42:06 +0200
committerAlex Blasche <alexander.blasche@qt.io>2018-07-25 14:42:18 +0200
commit25638b02766ae3109bfc83b3249e6d0dc9e21bdb (patch)
tree8ac8f0cd544dd39da674657940d6c509ea94721c /src/bluetooth/qbluetoothsocket_osx.mm
parentfc2a206322f6190226ebc1f04062f2c9170f0bac (diff)
parentb19148f9a0f820630bd83432d96117e9598c315d (diff)
Merge remote-tracking branch 'gerrit/dev' into btlebtle
Diffstat (limited to 'src/bluetooth/qbluetoothsocket_osx.mm')
-rw-r--r--src/bluetooth/qbluetoothsocket_osx.mm11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/bluetooth/qbluetoothsocket_osx.mm b/src/bluetooth/qbluetoothsocket_osx.mm
index de7e2120..ea39bb39 100644
--- a/src/bluetooth/qbluetoothsocket_osx.mm
+++ b/src/bluetooth/qbluetoothsocket_osx.mm
@@ -41,9 +41,7 @@
// The order is important (the first header contains
// the base class for a private socket) - workaround for
// dependencies problem.
-#include "qbluetoothsocket_p.h"
-#include "qbluetoothsocket_osx_p.h"
-//
+#include "qbluetoothsocketbase_p.h"
#include "qbluetoothsocket_osx_p.h"
#include "qbluetoothlocaldevice.h"
#include "qbluetoothdeviceinfo.h"
@@ -60,14 +58,14 @@
QT_BEGIN_NAMESPACE
QBluetoothSocketPrivate::QBluetoothSocketPrivate()
- : q_ptr(nullptr),
- writeChunk(std::numeric_limits<UInt16>::max()),
+ : writeChunk(std::numeric_limits<UInt16>::max()),
openMode(QIODevice::NotOpen), // That's what is set in public class' ctors.
state(QBluetoothSocket::UnconnectedState),
socketType(QBluetoothServiceInfo::UnknownProtocol),
socketError(QBluetoothSocket::NoSocketError),
isConnecting(false)
{
+ q_ptr = nullptr;
}
QBluetoothSocketPrivate::~QBluetoothSocketPrivate()
@@ -351,6 +349,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 +637,7 @@ void QBluetoothSocket::abort()
d_ptr->abort();
setSocketState(QBluetoothSocket::UnconnectedState);
+ emit readChannelFinished();
emit disconnected();
}
@@ -726,6 +726,7 @@ void QBluetoothSocket::close()
d_ptr->close();
setSocketState(UnconnectedState);
+ emit readChannelFinished();
emit disconnected();
}