aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-11-03 19:57:57 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-11-04 15:44:20 +0000
commit1bbbfa1af4fdb2413693f8b57d9e6c44009cedfa (patch)
tree0a5852a445df4cb4f9be1d9b31a42666e76312f1 /tests
parent99012cbe810b29e7b1b59eebeccc26e9177d7b5f (diff)
Implement TabBar without ExclusiveGroup
Make use of auto-exclusivity introduced in a108298. Fixes also the issue that the TabButton that corresponded currentIndex was not checked at startup. Change-Id: I44152e62c2dff30e8e0255c9403dcf46c4ea2f3a Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controls/data/tst_tabbar.qml7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_tabbar.qml b/tests/auto/controls/data/tst_tabbar.qml
index 7d659a9d..d40d5c0b 100644
--- a/tests/auto/controls/data/tst_tabbar.qml
+++ b/tests/auto/controls/data/tst_tabbar.qml
@@ -120,24 +120,29 @@ TestCase {
compare(control.count, 1)
compare(control.currentIndex, 0)
compare(control.currentItem.text, "0")
+ compare(control.currentItem.checked, true)
control.addItem(tabButton.createObject(control, {text: "1"}))
compare(control.count, 2)
compare(control.currentIndex, 0)
compare(control.currentItem.text, "0")
+ compare(control.currentItem.checked, true)
control.addItem(tabButton.createObject(control, {text: "2"}))
compare(control.count, 3)
compare(control.currentIndex, 0)
compare(control.currentItem.text, "0")
+ compare(control.currentItem.checked, true)
control.currentIndex = 1
compare(control.currentIndex, 1)
compare(control.currentItem.text, "1")
+ compare(control.currentItem.checked, true)
control.currentIndex = 2
compare(control.currentIndex, 2)
compare(control.currentItem.text, "2")
+ compare(control.currentItem.checked, true)
control.destroy()
}
@@ -148,6 +153,7 @@ TestCase {
compare(control.count, 2)
compare(control.currentIndex, 0)
compare(control.currentItem.text, "0")
+ compare(control.currentItem.checked, true)
control.destroy()
@@ -156,6 +162,7 @@ TestCase {
compare(control.count, 2)
compare(control.currentIndex, 1)
compare(control.currentItem.text, "1")
+ compare(control.currentItem.checked, true)
control.destroy()
}