summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@jollamobile.com>2013-10-09 17:20:24 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-16 13:02:19 +0100
commitb12bec0fcf6e7ec44b95f973e02dadcc4d4e55f0 (patch)
treefba4d3bb9ccb136456b7a097071eb21dc1713963 /src/plugins
parent9764f8602719676d1fa15e6fd1e7980af16bfc63 (diff)
always use connman to connect to cellular services
connman provides better error messages. Change-Id: Ifcfd4a4ff8d632273ab9ff7478a6c43cbf2cde98 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/src/plugins/bearer/connman/qconnmanengine.cpp b/src/plugins/bearer/connman/qconnmanengine.cpp
index e85949afb6..beda0a6a26 100644
--- a/src/plugins/bearer/connman/qconnmanengine.cpp
+++ b/src/plugins/bearer/connman/qconnmanengine.cpp
@@ -150,20 +150,7 @@ void QConnmanEngine::connectToId(const QString &id)
if(!serv.isValid()) {
emit connectionError(id, QBearerEngineImpl::InterfaceLookupError);
} else {
- if(serv.getType() != "cellular") {
-
- serv.connect();
- } else {
- QOfonoManagerInterface ofonoManager(0);
- QString modemPath = ofonoManager.currentModem().path();
- QOfonoDataConnectionManagerInterface dc(modemPath,0);
- foreach (const QDBusObjectPath &dcPath,dc.getPrimaryContexts()) {
- if(dcPath.path().contains(servicePath.section("_",-1))) {
- QOfonoConnectionContextInterface primaryContext(dcPath.path(),0);
- primaryContext.setActive(true);
- }
- }
- }
+ serv.connect();
}
}
@@ -175,19 +162,7 @@ void QConnmanEngine::disconnectFromId(const QString &id)
if(!serv.isValid()) {
emit connectionError(id, DisconnectionError);
} else {
- if(serv.getType() != "cellular") {
- serv.disconnect();
- } else {
- QOfonoManagerInterface ofonoManager(0);
- QString modemPath = ofonoManager.currentModem().path();
- QOfonoDataConnectionManagerInterface dc(modemPath,0);
- foreach (const QDBusObjectPath &dcPath,dc.getPrimaryContexts()) {
- if(dcPath.path().contains(servicePath.section("_",-1))) {
- QOfonoConnectionContextInterface primaryContext(dcPath.path(),0);
- primaryContext.setActive(false);
- }
- }
- }
+ serv.disconnect();
}
}