diff options
author | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-03-27 08:43:32 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-03-30 09:26:17 +0000 |
commit | dd5054b4b448ddab9fbd3c1b496fa56424a0d3dd (patch) | |
tree | 67eddb5998bfd9315f61d923a33dba015c983d1f /src | |
parent | e49ef4af0b202ef0387d6a76abd451f75760d1b8 (diff) |
Android: abort() QBluetoothSocket in its dtor
[ChangeLog][QBluetooth][Android] Forced QBluetoothSocket to close when
its dtor is called
Change-Id: Ie31a6b64e4939c800983b5c497532c6fcf90c7c0
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/bluetooth/qbluetoothsocket_android.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothsocket_android.cpp b/src/bluetooth/qbluetoothsocket_android.cpp index 7170a301..3217a9b8 100644 --- a/src/bluetooth/qbluetoothsocket_android.cpp +++ b/src/bluetooth/qbluetoothsocket_android.cpp @@ -185,6 +185,8 @@ QBluetoothSocketPrivate::QBluetoothSocketPrivate() QBluetoothSocketPrivate::~QBluetoothSocketPrivate() { + if (state != QBluetoothSocket::UnconnectedState) + emit closeJavaSocket(); } bool QBluetoothSocketPrivate::ensureNativeSocket(QBluetoothServiceInfo::Protocol type) |