summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/connman
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@jollamobile.com>2014-03-21 05:04:08 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-20 21:07:48 +0100
commite368866d68666eb32754aeeffda78bc338f7e2e1 (patch)
tree0bb82dbba74c861cbf44a65ab097e5546bc56a9f /src/plugins/bearer/connman
parentda77aaa98c8ab40b26154011473a3d2de5e27ffe (diff)
make sure connman bearer service is autconnect before connecting
Change-Id: I4c9a93d69f7fe990bf9d7f2e939abbe2c82ba449 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/plugins/bearer/connman')
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/plugins/bearer/connman/qconnmanengine.cpp b/src/plugins/bearer/connman/qconnmanengine.cpp
index 797c30c7c6..0903496472 100644
--- a/src/plugins/bearer/connman/qconnmanengine.cpp
+++ b/src/plugins/bearer/connman/qconnmanengine.cpp
@@ -189,7 +189,20 @@ void QConnmanEngine::connectToId(const QString &id)
if (!serv->isValid()) {
emit connectionError(id, QBearerEngineImpl::InterfaceLookupError);
} else {
- serv->connect();
+ if (serv->type() == QLatin1String("cellular")) {
+ if (serv->roaming()) {
+ if (!isRoamingAllowed(serv->path())) {
+ emit connectionError(id, QBearerEngineImpl::OperationNotSupported);
+ return;
+ }
+ if (isAlwaysAskRoaming()) {
+ emit connectionError(id, QBearerEngineImpl::OperationNotSupported);
+ return;
+ }
+ }
+ }
+ if (serv->autoConnect())
+ serv->connect();
}
}