on xenial help sign in
Add light indicators to tst_Shell
805b904Dalton Durst
qml/Shell.qml+5−3
@@ -72,7 +72,7 @@ StyledItem {
72 property bool supportsMultiColorLed: true
72 property bool supportsMultiColorLed: true
73
73
74 // Used by tests
74 // Used by tests
75− property bool lightIndicators: false
75+ property alias lightIndicators: indicatorsModel.light
76
76
77 // to be read from outside
77 // to be read from outside
78 readonly property int mainAppWindowOrientationAngle: stage.mainAppWindowOrientationAngle
78 readonly property int mainAppWindowOrientationAngle: stage.mainAppWindowOrientationAngle
@@ -535,6 +535,7 @@ StyledItem {
535 && settings.enableIndicatorMenu
535 && settings.enableIndicatorMenu
536
536
537 model: Indicators.IndicatorsModel {
537 model: Indicators.IndicatorsModel {
538+ id: indicatorsModel
538 // tablet and phone both use the same profile
539 // tablet and phone both use the same profile
539 // FIXME: use just "phone" for greeter too, but first fix
540 // FIXME: use just "phone" for greeter too, but first fix
540 // greeter app launching to either load the app inside the
541 // greeter app launching to either load the app inside the
@@ -542,8 +543,9 @@ StyledItem {
542 // involve taking the url-dispatcher dbus name and using
543 // involve taking the url-dispatcher dbus name and using
543 // SessionBroadcast to tell the session.
544 // SessionBroadcast to tell the session.
544 profile: shell.mode === "greeter" ? "desktop_greeter" : "phone"
545 profile: shell.mode === "greeter" ? "desktop_greeter" : "phone"
545− light: root.lightIndicators
546− Component.onCompleted: load();
546+ Component.onCompleted: {
547+ load();
548+ }
547 }
549 }
548 }
550 }
549
551
tests/qmltests/tst_Shell.qml+1
@@ -87,6 +87,7 @@ Rectangle {
87 }
87 }
88 mode: shellRect.mode
88 mode: shellRect.mode
89 hasTouchscreen: true
89 hasTouchscreen: true
90+ lightIndicators: true
90 }
91 }
91 }
92 }
92
93