aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-09-01 20:31:50 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-09-02 07:26:54 +0000
commitd00c6d93ce1974e27bb49c57ae87156260501577 (patch)
tree9302d513122dd720c0a1e85a8b1d35c144fe9d5a /tests
parent79636b847d9ee04475cf1a0415996d483ad32593 (diff)
Switch: fix Qt::ClickFocus on the indicator
Task-number: QTBUG-55647 Change-Id: Ic89beaa1e6674d3f94c9a713fd9bd8e8fdfafbb6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controls/data/tst_switch.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_switch.qml b/tests/auto/controls/data/tst_switch.qml
index f12e7612..ff81be16 100644
--- a/tests/auto/controls/data/tst_switch.qml
+++ b/tests/auto/controls/data/tst_switch.qml
@@ -263,4 +263,15 @@ TestCase {
compare(control.baselineOffset, control.contentItem.y + control.contentItem.baselineOffset)
control.destroy()
}
+
+ function test_focus() {
+ var control = swtch.createObject(testCase)
+ verify(control)
+
+ verify(!control.activeFocus)
+ mouseClick(control.indicator)
+ verify(control.activeFocus)
+
+ control.destroy()
+ }
}