on xenial help sign in
Update ScopeSettingBoolean
257402eAndrea Cimitan
qml/Dash/ScopeSettings/ScopeSettingBoolean.qml+2
@@ -24,6 +24,7 @@ ScopeSetting {
24
24
25 ListItem.Empty {
25 ListItem.Empty {
26 id: listItem
26 id: listItem
27+
27 onClicked: {
28 onClicked: {
28 control.checked = !control.checked
29 control.checked = !control.checked
29 updated(control.checked)
30 updated(control.checked)
@@ -44,6 +45,7 @@ ScopeSetting {
44
45
45 CheckBox {
46 CheckBox {
46 id: control
47 id: control
48+ objectName: "control"
47 anchors {
49 anchors {
48 right: parent.right
50 right: parent.right
49 rightMargin: __margins
51 rightMargin: __margins
tests/qmltests/Dash/ScopeSettings/tst_ScopeSettingBoolean.qml+5
@@ -52,6 +52,11 @@ Rectangle {
52 mouseClick(control, control.width / 2, control.height / 2);
52 mouseClick(control, control.width / 2, control.height / 2);
53 spy.wait();
53 spy.wait();
54 compare(spy.signalArguments[0][0], false);
54 compare(spy.signalArguments[0][0], false);
55+
56+ spy.clear();
57+ mouseClick(scopeSetting, scopeSetting.width / 2, scopeSetting.height / 2);
58+ spy.wait();
59+ compare(spy.signalArguments[0][0], true);
55 }
60 }
56 }
61 }
57}
62}