mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
remove ofono import from Desktop
all in Pin that is conditionally loaded: it should fail more gracefully
This commit is contained in:
parent
5798ab3e48
commit
ebb4e5677a
2 changed files with 47 additions and 49 deletions
|
|
@ -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.components 2.0 as PlasmaComponents
|
||||||
import org.kde.plasma.workspace.components 2.0 as PlasmaWorkspace
|
import org.kde.plasma.workspace.components 2.0 as PlasmaWorkspace
|
||||||
import org.kde.kquickcontrolsaddons 2.0
|
import org.kde.kquickcontrolsaddons 2.0
|
||||||
import MeeGo.QOfono 0.2
|
|
||||||
import "../components"
|
import "../components"
|
||||||
|
|
||||||
Item {
|
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
|
//pass the focus to the containment, so it can react to homescreen activate/inactivate
|
||||||
Connections {
|
Connections {
|
||||||
target: desktop
|
target: desktop
|
||||||
|
|
@ -133,7 +86,7 @@ Item {
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
z: 21
|
z: 21
|
||||||
source: simManager.pinRequired != OfonoSimManager.NoPin ? Qt.resolvedUrl("Pin.qml") : ""
|
source: Qt.resolvedUrl("Pin.qml")
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,54 @@ Rectangle {
|
||||||
color: "black"
|
color: "black"
|
||||||
opacity: 0.8
|
opacity: 0.8
|
||||||
visible: simManager.pinRequired != OfonoSimManager.NoPin
|
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 color textColor: "white"
|
||||||
property OfonoSimManager simManager: homescreen.simManager
|
|
||||||
|
|
||||||
function addNumber(number) {
|
function addNumber(number) {
|
||||||
pinLabel.text = pinLabel.text + number
|
pinLabel.text = pinLabel.text + number
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue