fix qml warnings

This commit is contained in:
Marco Martin 2014-11-03 21:17:02 +01:00
parent 711b0c8136
commit 0578241078

View file

@ -102,25 +102,23 @@ Item {
Component.onCompleted: {
console.log(ofonoManager.modems)
}
modemPath: ofonoManager.modems[0]
modemPath: ofonoManager.modems.length > 0 ? ofonoManager.modems[0] : ""
}
OfonoModem {
id: modem1
modemPath: ofonoManager.modems[0]
modemPath: ofonoManager.modems.length > 0 ? ofonoManager.modems[0] : ""
}
OfonoContextConnection {
id: context1
contextPath : ofono1.contexts[0]
contextPath : ofono1.contexts.length > 0 ? ofono1.contexts[0] : ""
Component.onCompleted: {
print("Context Active: " + context1.active)
textLine.text = context1.active ? "online" : "offline"
}
onActiveChanged: {
print("Context Active: " + context1.active)
textLine.text = context1.active ? "online" : "offline"
}
}
@ -322,9 +320,9 @@ Item {
left: strengthIcon.right
verticalCenter: parent.verticalCenter
}
text: netreg.strength + "% " + (ofonoManager.available ? netreg.currentOperator["Name"].toString() :"Ofono not available")
text: netreg.strength + "% " + (ofonoManager.available && netreg.currentOperator ? netreg.currentOperator["Name"].toString() :"Ofono not available")
color: "white"
font.pixelSize: height / 2
font.pixelSize: parent.height / 2
}
Text {
id: clock