aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@theqtcompany.com>2016-04-26 15:51:50 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-04-27 16:02:50 +0000
commitd6b32468667a4890cef6061f08c353a0d0cba43e (patch)
tree270287bd5725b4de6a8edc1b2809eb4adbd51e65 /tests/auto/controls/data
parent9e79b19a305960a3df7bd1c90675ba00cd972153 (diff)
Move highlighted to subclasses that actually use it
Change-Id: I70468b35b2a3a03c6e2d557a67443291697c8b42 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests/auto/controls/data')
-rw-r--r--tests/auto/controls/data/tst_abstractbutton.qml9
-rw-r--r--tests/auto/controls/data/tst_button.qml11
-rw-r--r--tests/auto/controls/data/tst_itemdelegate.qml11
-rw-r--r--tests/auto/controls/data/tst_menuitem.qml11
4 files changed, 33 insertions, 9 deletions
diff --git a/tests/auto/controls/data/tst_abstractbutton.qml b/tests/auto/controls/data/tst_abstractbutton.qml
index 96c2ccaa..c94653d9 100644
--- a/tests/auto/controls/data/tst_abstractbutton.qml
+++ b/tests/auto/controls/data/tst_abstractbutton.qml
@@ -67,13 +67,4 @@ TestCase {
control.destroy();
}
-
- function test_highlighted() {
- var control = button.createObject(testCase)
- verify(control)
- compare(control.highlighted, false)
-
- control.highlighted = true
- compare(control.highlighted, true)
- }
}
diff --git a/tests/auto/controls/data/tst_button.qml b/tests/auto/controls/data/tst_button.qml
index ac7915ad..f8717a88 100644
--- a/tests/auto/controls/data/tst_button.qml
+++ b/tests/auto/controls/data/tst_button.qml
@@ -291,4 +291,15 @@ TestCase {
control.destroy()
}
+
+ function test_highlighted() {
+ var control = button.createObject(testCase)
+ verify(control)
+ verify(!control.highlighted)
+
+ control.highlighted = true
+ verify(control.highlighted)
+
+ control.destroy()
+ }
}
diff --git a/tests/auto/controls/data/tst_itemdelegate.qml b/tests/auto/controls/data/tst_itemdelegate.qml
index 0cd9c27b..37b0db2a 100644
--- a/tests/auto/controls/data/tst_itemdelegate.qml
+++ b/tests/auto/controls/data/tst_itemdelegate.qml
@@ -61,4 +61,15 @@ TestCase {
compare(control.baselineOffset, control.contentItem.y + control.contentItem.baselineOffset)
control.destroy()
}
+
+ function test_highlighted() {
+ var control = itemDelegate.createObject(testCase)
+ verify(control)
+ verify(!control.highlighted)
+
+ control.highlighted = true
+ verify(control.highlighted)
+
+ control.destroy()
+ }
}
diff --git a/tests/auto/controls/data/tst_menuitem.qml b/tests/auto/controls/data/tst_menuitem.qml
index 28b1cb8f..be0c0652 100644
--- a/tests/auto/controls/data/tst_menuitem.qml
+++ b/tests/auto/controls/data/tst_menuitem.qml
@@ -80,4 +80,15 @@ TestCase {
control.destroy()
}
+
+ function test_highlighted() {
+ var control = menuItem.createObject(testCase)
+ verify(control)
+ verify(!control.highlighted)
+
+ control.highlighted = true
+ verify(control.highlighted)
+
+ control.destroy()
+ }
}