summaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2014-01-15 15:10:18 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-15 21:52:44 +0100
commitabe9056ad539d4add76ba5cc3b585eed96497989 (patch)
tree759213fb69dca61a1d57cb0d22718e419ad16570 /src/imports
parentef6de7d737daa42c3390a0393e77044e91df9ae1 (diff)
Reset QML Bluetooth discovery model if an error occurred during device discovery
This is due to a behavior difference of the finished() signal between service and device discovery. Change-Id: I59d6358171275987f07f86a6da80e8435445fd0e Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp
index 6689d663..e39a26af 100644
--- a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp
+++ b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp
@@ -167,6 +167,11 @@ void QDeclarativeBluetoothDiscoveryModel::errorDeviceDiscovery(QBluetoothDeviceD
{
d->m_error = static_cast<QDeclarativeBluetoothDiscoveryModel::Error>(error);
emit errorChanged();
+
+ //QBluetoothDeviceDiscoveryAgent::finished() signal is not emitted in case of an error
+ //Note that this behavior is different from QBluetoothServiceDiscoveryAgent.
+ //This reset the models running flag.
+ setRunning(false);
}
void QDeclarativeBluetoothDiscoveryModel::clearModel()