summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/connman
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2016-07-26 10:43:29 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2016-07-26 10:43:29 +0200
commit6c5de416c9e77433b20b95621c75666a47fbffbd (patch)
tree313690f41f9d6a1d8dd569b47156305463e3d615 /src/plugins/bearer/connman
parent091e61b3525c700ce4198086bbd0d95a59fcb31f (diff)
parent8ea6e8d525b9dd8703ebdd0938706bd9785858a4 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/corelib/io/qtemporarydir.cpp One side encapsulated a repeated piece of #if-ery in a local define; the other added to the #if-ery. Made its addition to the other's. src/corelib/kernel/qeventdispatcher_unix_p.h One side moved some members into a struct; this collided with a #undef check that neither side now has. Discarded the #undef part. src/gui/opengl/qopengltexturehelper_p.h 5.7 deleted a bunch of methods; not clear why merge got confused. src/tools/moc/moc.cpp One added a name to the copyright header; another changed its URL. Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
Diffstat (limited to 'src/plugins/bearer/connman')
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.cpp10
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.h2
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux.cpp13
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux_p.h6
4 files changed, 21 insertions, 10 deletions
diff --git a/src/plugins/bearer/connman/qconnmanengine.cpp b/src/plugins/bearer/connman/qconnmanengine.cpp
index 3f42f8828a..51ee51a64a 100644
--- a/src/plugins/bearer/connman/qconnmanengine.cpp
+++ b/src/plugins/bearer/connman/qconnmanengine.cpp
@@ -91,7 +91,7 @@ void QConnmanEngine::initialize()
this, SLOT(updateServices(ConnmanMapList,QList<QDBusObjectPath>)));
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);
@@ -203,11 +203,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<QDBusObjectPath> &removed)
diff --git a/src/plugins/bearer/connman/qconnmanengine.h b/src/plugins/bearer/connman/qconnmanengine.h
index 3827ea167f..23c158ac34 100644
--- a/src/plugins/bearer/connman/qconnmanengine.h
+++ b/src/plugins/bearer/connman/qconnmanengine.h
@@ -100,7 +100,7 @@ private Q_SLOTS:
void updateServices(const ConnmanMapList &changed, const QList<QDBusObjectPath> &removed);
void servicesReady(const QStringList &);
- void finishedScan();
+ void finishedScan(bool error);
void changedModem();
void serviceStateChanged(const QString &state);
void configurationChange(QConnmanServiceInterface * service);
diff --git a/src/plugins/bearer/connman/qconnmanservice_linux.cpp b/src/plugins/bearer/connman/qconnmanservice_linux.cpp
index 135aad4dec..7fbbe2cd07 100644
--- a/src/plugins/bearer/connman/qconnmanservice_linux.cpp
+++ b/src/plugins/bearer/connman/qconnmanservice_linux.cpp
@@ -249,13 +249,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 &)
@@ -265,7 +268,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)));
}
}
@@ -501,7 +504,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();
}
diff --git a/src/plugins/bearer/connman/qconnmanservice_linux_p.h b/src/plugins/bearer/connman/qconnmanservice_linux_p.h
index 0e774d50c3..d2804ebca6 100644
--- a/src/plugins/bearer/connman/qconnmanservice_linux_p.h
+++ b/src/plugins/bearer/connman/qconnmanservice_linux_p.h
@@ -115,7 +115,7 @@ public:
bool getOfflineMode();
QStringList getTechnologies();
QStringList getServices();
- void requestScan(const QString &type);
+ bool requestScan(const QString &type);
QHash<QString, QConnmanTechnologyInterface *> technologiesMap;
@@ -126,7 +126,7 @@ Q_SIGNALS:
void servicesChanged(const ConnmanMapList&, const QList<QDBusObjectPath> &);
void servicesReady(const QStringList &);
- void scanFinished();
+ void scanFinished(bool error);
protected:
void connectNotify(const QMetaMethod &signal);
@@ -211,7 +211,7 @@ public:
Q_SIGNALS:
void propertyChanged(const QString &, const QDBusVariant &value);
void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
- void scanFinished();
+ void scanFinished(bool error);
protected:
void connectNotify(const QMetaMethod &signal);
QVariant getProperty(const QString &);