From 5254e62e1898cffe397ecd0b0c8be43213e5b4e8 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Tue, 21 Jan 2014 16:00:01 +0100 Subject: Stop SDP search if QML Model is turned off So far, we only ever disabled the device search. If a SDP discovery was running and we changed to device discovery the SDP discovery kept running in the background. Change-Id: I5f2cf88ecf7f9b5cfe2608e0ceda366b552982e5 Reviewed-by: Fabian Bumberger --- src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/imports') diff --git a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp index 6689d663..b7534329 100644 --- a/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp +++ b/src/imports/bluetooth/qdeclarativebluetoothdiscoverymodel.cpp @@ -367,11 +367,10 @@ void QDeclarativeBluetoothDiscoveryModel::setRunning(bool running) d->m_running = running; if (!running) { - if (d->m_deviceAgent) { + if (d->m_deviceAgent) d->m_deviceAgent->stop(); - } else if (d->m_serviceAgent) { + if (d->m_serviceAgent) d->m_serviceAgent->stop(); - } } else { clearModel(); d->m_error = NoError; -- cgit v1.2.3