summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/connman/qconnmanservice_linux.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/bearer/connman/qconnmanservice_linux.cpp')
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux.cpp13
1 files changed, 10 insertions, 3 deletions
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<QVariantMap> props_reply = *call;
+ if (props_reply.isError()) {
+ qDebug() << props_reply.error().message();
+ }
+ Q_EMIT scanFinished(props_reply.isError());
call->deleteLater();
}