on xenial help sign in
Use a Binding instead of a Connection for lights
91f7a02Michael Terry
qml/Panel/Indicators/IndicatorsLight.qml+4−7
@@ -27,12 +27,9 @@ QtObject {
27 Component.onDestruction: Lights.state = Lights.Off
27 Component.onDestruction: Lights.state = Lights.Off
28
28
29 // QtObject does not have children
29 // QtObject does not have children
30− property var _connections: Connections {
30+ property var _binding: Binding {
31− id: powerConnection
32−
33− target: Powerd
31+ target: Lights
34− onStatusChanged: {
32+ property: "state"
35− Lights.state = (Powerd.status === Powerd.Off) ? Lights.On : Lights.Off
33+ value: (Powerd.status === Powerd.Off) ? Lights.On : Lights.Off
36− }
37 }
34 }
38}
35}