From b12bec0fcf6e7ec44b95f973e02dadcc4d4e55f0 Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Wed, 9 Oct 2013 17:20:24 +1000 Subject: always use connman to connect to cellular services connman provides better error messages. Change-Id: Ifcfd4a4ff8d632273ab9ff7478a6c43cbf2cde98 Reviewed-by: Robin Burchell --- src/plugins/bearer/connman/qconnmanengine.cpp | 29 ++------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) (limited to 'src/plugins/bearer/connman/qconnmanengine.cpp') 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(); } } -- cgit v1.2.3