diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-01-17 13:37:35 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-20 13:50:29 +0100 |
commit | 1f33f347fad40f71fa89110c084880a81db1d15a (patch) | |
tree | c78d133f264556b772faa910bbaba23362de32cb /src/bluetooth | |
parent | 576cdf8ec66e15efe7e306199442465addd7c9d9 (diff) |
Do not clear result lists while the SDP search is ongoing.
Or bad things will happen...
Change-Id: I7df3925ff5d15f3f904f4dd38e24b247ec151fd1
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Diffstat (limited to 'src/bluetooth')
-rw-r--r-- | src/bluetooth/qbluetoothservicediscoveryagent.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent.cpp b/src/bluetooth/qbluetoothservicediscoveryagent.cpp index a1a9378c..87ccb108 100644 --- a/src/bluetooth/qbluetoothservicediscoveryagent.cpp +++ b/src/bluetooth/qbluetoothservicediscoveryagent.cpp @@ -280,7 +280,8 @@ void QBluetoothServiceDiscoveryAgent::stop() } /*! - Clears the results of previous service discoveries. + Clears the results of previous service discoveries and resets \l uuidFilter(). + This function does nothing during an ongoing service discovery (see \l isActive()). \sa discoveredServices() */ @@ -288,6 +289,10 @@ void QBluetoothServiceDiscoveryAgent::clear() { Q_D(QBluetoothServiceDiscoveryAgent); + //don't clear the list while the search is ongoing + if (isActive()) + return; + d->discoveredDevices.clear(); d->discoveredServices.clear(); d->uuidFilter.clear(); |