From ebb4e5677a6984265e954f7faa5ae47513badac8 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 3 Jun 2015 10:00:18 -0700 Subject: [PATCH] remove ofono import from Desktop all in Pin that is conditionally loaded: it should fail more gracefully --- shell/contents/views/Desktop.qml | 49 +------------------------------- shell/contents/views/Pin.qml | 47 +++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 49 deletions(-) diff --git a/shell/contents/views/Desktop.qml b/shell/contents/views/Desktop.qml index a2ed9bf2..cd5457d6 100644 --- a/shell/contents/views/Desktop.qml +++ b/shell/contents/views/Desktop.qml @@ -25,7 +25,6 @@ import org.kde.plasma.shell 2.0 as Shell import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.workspace.components 2.0 as PlasmaWorkspace import org.kde.kquickcontrolsaddons 2.0 -import MeeGo.QOfono 0.2 import "../components" Item { @@ -53,52 +52,6 @@ Item { } } - OfonoManager { - id: ofonoManager - onAvailableChanged: { - console.log("Ofono is " + available) - } - onModemAdded: { - console.log("modem added " + modem) - } - onModemRemoved: console.log("modem removed") - } - - OfonoConnMan { - id: ofono1 - Component.onCompleted: { - console.log(ofonoManager.modems) - } - modemPath: ofonoManager.modems.length > 0 ? ofonoManager.modems[0] : "" - } - - OfonoModem { - id: modem1 - modemPath: ofonoManager.modems.length > 0 ? ofonoManager.modems[0] : "" - - } - - OfonoContextConnection { - id: context1 - contextPath : ofono1.contexts.length > 0 ? ofono1.contexts[0] : "" - Component.onCompleted: { - print("Context Active: " + context1.active) - } - onActiveChanged: { - print("Context Active: " + context1.active) - } - } - - property OfonoSimManager simManager: ofonoSimManager - OfonoSimManager { - id: ofonoSimManager - modemPath: ofonoManager.modems.length > 0 ? ofonoManager.modems[0] : "" - } - - OfonoNetworkOperator { - id: netop - } - //pass the focus to the containment, so it can react to homescreen activate/inactivate Connections { target: desktop @@ -133,7 +86,7 @@ Item { bottom: parent.bottom } z: 21 - source: simManager.pinRequired != OfonoSimManager.NoPin ? Qt.resolvedUrl("Pin.qml") : "" + source: Qt.resolvedUrl("Pin.qml") } Component.onCompleted: { diff --git a/shell/contents/views/Pin.qml b/shell/contents/views/Pin.qml index bc58bcf3..e0705c92 100644 --- a/shell/contents/views/Pin.qml +++ b/shell/contents/views/Pin.qml @@ -29,9 +29,54 @@ Rectangle { color: "black" opacity: 0.8 visible: simManager.pinRequired != OfonoSimManager.NoPin + property OfonoSimManager simManager: ofonoSimManager + + OfonoManager { + id: ofonoManager + onAvailableChanged: { + console.log("Ofono is " + available) + } + onModemAdded: { + console.log("modem added " + modem) + } + onModemRemoved: console.log("modem removed") + } + + OfonoConnMan { + id: ofono1 + Component.onCompleted: { + console.log(ofonoManager.modems) + } + modemPath: ofonoManager.modems.length > 0 ? ofonoManager.modems[0] : "" + } + + OfonoModem { + id: modem1 + modemPath: ofonoManager.modems.length > 0 ? ofonoManager.modems[0] : "" + + } + + OfonoContextConnection { + id: context1 + contextPath : ofono1.contexts.length > 0 ? ofono1.contexts[0] : "" + Component.onCompleted: { + print("Context Active: " + context1.active) + } + onActiveChanged: { + print("Context Active: " + context1.active) + } + } + + OfonoSimManager { + id: ofonoSimManager + modemPath: ofonoManager.modems.length > 0 ? ofonoManager.modems[0] : "" + } + + OfonoNetworkOperator { + id: netop + } property color textColor: "white" - property OfonoSimManager simManager: homescreen.simManager function addNumber(number) { pinLabel.text = pinLabel.text + number