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/qconnmanservice_linux.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/plugins/bearer/connman/qconnmanservice_linux.cpp') diff --git a/src/plugins/bearer/connman/qconnmanservice_linux.cpp b/src/plugins/bearer/connman/qconnmanservice_linux.cpp index 10d8285a4a..40bab4fda6 100644 --- a/src/plugins/bearer/connman/qconnmanservice_linux.cpp +++ b/src/plugins/bearer/connman/qconnmanservice_linux.cpp @@ -243,13 +243,16 @@ QStringList QConnmanManagerInterface::getServices() return servicesList; } -void QConnmanManagerInterface::requestScan(const QString &type) +bool QConnmanManagerInterface::requestScan(const QString &type) { + bool scanned = false; Q_FOREACH (QConnmanTechnologyInterface *tech, technologiesMap) { if (tech->type() == type) { tech->scan(); + scanned = true; } } + return scanned; } void QConnmanManagerInterface::technologyAdded(const QDBusObjectPath &path, const QVariantMap &) @@ -259,7 +262,7 @@ void QConnmanManagerInterface::technologyAdded(const QDBusObjectPath &path, cons QConnmanTechnologyInterface *tech; tech = new QConnmanTechnologyInterface(path.path(),this); technologiesMap.insert(path.path(),tech); - connect(tech,SIGNAL(scanFinished()),this,SIGNAL(scanFinished())); + connect(tech,SIGNAL(scanFinished(bool)),this,SIGNAL(scanFinished(bool))); } } @@ -495,7 +498,11 @@ void QConnmanTechnologyInterface::scan() void QConnmanTechnologyInterface::scanReply(QDBusPendingCallWatcher *call) { - Q_EMIT scanFinished(); + QDBusPendingReply props_reply = *call; + if (props_reply.isError()) { + qDebug() << props_reply.error().message(); + } + Q_EMIT scanFinished(props_reply.isError()); call->deleteLater(); } -- cgit v1.2.3