diff options
author | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-09-30 15:50:20 +0200 |
---|---|---|
committer | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-09-30 17:00:24 +0200 |
commit | 7b4808089eb3b37dc3e954a44f938a0c11d592d0 (patch) | |
tree | 0ccd1c14620ce12b2d93cb4d5a9d2138620ae4d7 /src/bluetooth/qbluetoothservicediscoveryagent_osx.mm | |
parent | 0d1fca04f5f3b34e0b4f358a982b9b8d85f9da54 (diff) |
QBluetoothServiceDiscoveryAgent - bugfix for OS X.
startServiceDiscovery should set a state into inactive, if all devices were
scanned already, otherwise, it's not possible to start a discovery again
after it's finished once. performMinimalDiscovery should apply a filter
(if any)
Change-Id: I5bb635a381be6e612c80ce14cb9ceeb509439fdb
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothservicediscoveryagent_osx.mm')
-rw-r--r-- | src/bluetooth/qbluetoothservicediscoveryagent_osx.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_osx.mm b/src/bluetooth/qbluetoothservicediscoveryagent_osx.mm index 5bec4291..9924f9ae 100644 --- a/src/bluetooth/qbluetoothservicediscoveryagent_osx.mm +++ b/src/bluetooth/qbluetoothservicediscoveryagent_osx.mm @@ -169,6 +169,7 @@ void QBluetoothServiceDiscoveryAgentPrivate::startServiceDiscovery() "startServiceDiscovery()", "invalid bluetooth adapter"); if (discoveredDevices.isEmpty()) { + state = Inactive; emit q_ptr->finished(); return; } @@ -359,6 +360,9 @@ void QBluetoothServiceDiscoveryAgentPrivate::performMinimalServiceDiscovery(cons if (!serviceInfo.isValid()) continue; + if (!uuidFilter.isEmpty() && !uuidFilter.contains(serviceInfo.serviceUuid())) + continue; + if (!isDuplicatedService(serviceInfo)) { discoveredServices.append(serviceInfo); emit q_ptr->serviceDiscovered(serviceInfo); |