From b2029e9ca6c1645e85cbada1b09ba63fd1ee31ed Mon Sep 17 00:00:00 2001 From: Takumi ASAKI Date: Mon, 4 Jul 2016 13:57:09 +0900 Subject: Bearer/Connman: emit missing updateCompleted() emit missing updateCompleted() in some conditions after QNetworkConfigurationManager::updateConfigurations() is called. * There is no wifi devices. * The wifi device returns error when scan is called. Change-Id: I2668644249a0584bf43efea95348424aa64ab4a6 Reviewed-by: Lorn Potter --- src/plugins/bearer/connman/qconnmanengine.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/plugins/bearer/connman/qconnmanengine.cpp') diff --git a/src/plugins/bearer/connman/qconnmanengine.cpp b/src/plugins/bearer/connman/qconnmanengine.cpp index b7cc5f949c..fdedaa46dc 100644 --- a/src/plugins/bearer/connman/qconnmanengine.cpp +++ b/src/plugins/bearer/connman/qconnmanengine.cpp @@ -85,7 +85,7 @@ void QConnmanEngine::initialize() this, SLOT(updateServices(ConnmanMapList,QList))); connect(connmanManager,SIGNAL(servicesReady(QStringList)),this,SLOT(servicesReady(QStringList))); - connect(connmanManager,SIGNAL(scanFinished()),this,SLOT(finishedScan())); + connect(connmanManager,SIGNAL(scanFinished(bool)),this,SLOT(finishedScan(bool))); foreach (const QString &servPath, connmanManager->getServices()) { addServiceConfiguration(servPath); @@ -197,11 +197,15 @@ void QConnmanEngine::requestUpdate() void QConnmanEngine::doRequestUpdate() { - connmanManager->requestScan("wifi"); + bool scanned = connmanManager->requestScan("wifi"); + if (!scanned) + Q_EMIT updateCompleted(); } -void QConnmanEngine::finishedScan() +void QConnmanEngine::finishedScan(bool error) { + if (error) + Q_EMIT updateCompleted(); } void QConnmanEngine::updateServices(const ConnmanMapList &changed, const QList &removed) -- cgit v1.2.3