From abe9056ad539d4add76ba5cc3b585eed96497989 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Wed, 15 Jan 2014 15:10:18 +0100 Subject: 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 --- src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/imports') 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(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() -- cgit v1.2.3