summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-01-20 12:15:46 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-01-21 17:11:27 +0000
commite77409b85555f0feec8d097bb283c6daa6e3a728 (patch)
treec9b00a9c498b0fe64727d8826298bb73b73222ba
parentb013a2d764a4e4814699bfefc6adc94b57ead132 (diff)
Android: Fix SPP protocol detection during service discovery
A bug was introduced during refactoring in 66bb9839dbccea311cbb85168da86fb6d4a2d136. After the refactoring the boolean 'ok' variable was always false, so the condition in the right part was always evaluated to false. Change-Id: I25e98f7315778fa9f3fa22f2874d5641337c5715 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi> (cherry picked from commit c7d2cf1127012e8be8d9cb4aed5ea7bd6718133c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent_android.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp
index 6c93dc00..eb2a6b5c 100644
--- a/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp
+++ b/src/bluetooth/qbluetoothservicediscoveryagent_android.cpp
@@ -361,8 +361,7 @@ void QBluetoothServiceDiscoveryAgentPrivate::populateDiscoveredServices(const QB
continue;
//check for SPP protocol
- bool ok = false;
- haveSppClass |= ok && uuid == QBluetoothUuid::ServiceClassUuid::SerialPort;
+ haveSppClass |= uuid == QBluetoothUuid::ServiceClassUuid::SerialPort;
//check for custom uuid
if (uuid.minimumSize() == 16)