summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2018-08-09 13:14:36 +0200
committerAlex Blasche <alexander.blasche@qt.io>2018-08-09 11:56:46 +0000
commitb6edd379204221bf9848b3648106e56c7c2cd7e6 (patch)
treea961ccd84af65befa99b55f80fc61be4980a599b /src
parent45c843ceca9fac1aa1246043730eaeeb3ed23235 (diff)
Fix QBluetoothSocket::socketDescriptor() for BlueZ DBus
Task-number: QTBUG-68550 Change-Id: Ibc22b9a51336855c0a981f9280e6ae9ede9437b4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/bluetooth/qbluetoothsocket_bluezdbus.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothsocket_bluezdbus.cpp b/src/bluetooth/qbluetoothsocket_bluezdbus.cpp
index e9c47df8..c3055d63 100644
--- a/src/bluetooth/qbluetoothsocket_bluezdbus.cpp
+++ b/src/bluetooth/qbluetoothsocket_bluezdbus.cpp
@@ -540,6 +540,7 @@ void QBluetoothSocketPrivateBluezDBus::remoteConnected(const QDBusUnixFileDescri
connect(localSocket, &QLocalSocket::stateChanged,
this, &QBluetoothSocketPrivateBluezDBus::socketStateChanged);
+ socket = descriptor;
q->setSocketState(QBluetoothSocket::ConnectedState);
emit q->connected();
}
@@ -582,6 +583,8 @@ void QBluetoothSocketPrivateBluezDBus::clearSocket()
localSocket = nullptr;
}
+ socket = -1;
+
if (q->state() == QBluetoothSocket::ConnectedState) {
OrgBluezDevice1Interface device(QStringLiteral("org.bluez"), remoteDevicePath,
QDBusConnection::systemBus());