summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bluetooth/qbluetoothsocket_bluezdbus.cpp4
-rw-r--r--tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothsocket_bluezdbus.cpp b/src/bluetooth/qbluetoothsocket_bluezdbus.cpp
index 3ce7e8b6..1b644a6d 100644
--- a/src/bluetooth/qbluetoothsocket_bluezdbus.cpp
+++ b/src/bluetooth/qbluetoothsocket_bluezdbus.cpp
@@ -284,6 +284,10 @@ void QBluetoothSocketPrivateBluezDBus::connectToService(
return;
}
+ if (service.socketProtocol() != QBluetoothServiceInfo::Protocol::UnknownProtocol)
+ socketType = service.socketProtocol();
+ qCDebug(QT_BT_BLUEZ) << "Socket protocol used:" << socketType;
+
connectToService(service.device().address(), targetService, openMode);
}
diff --git a/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp b/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp
index 05bc1a0f..a7b5ef1f 100644
--- a/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp
+++ b/tests/auto/qbluetoothsocket/tst_qbluetoothsocket.cpp
@@ -142,7 +142,7 @@ void tst_QBluetoothSocket::initTestCase()
qDebug() << "Starting discovery";
sda->setUuidFilter(QBluetoothUuid(QString(TEST_SERVICE_UUID)));
- sda->start(QBluetoothServiceDiscoveryAgent::MinimalDiscovery);
+ sda->start(QBluetoothServiceDiscoveryAgent::FullDiscovery);
for (int connectTime = MaxConnectTime; !done_discovery && connectTime > 0; connectTime -= 1000)
QTest::qWait(1000);