aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-05-20 18:19:11 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-05-23 06:59:15 +0000
commit83a91bc0738dd9336a36a230ebd8c5cacbff65bc (patch)
treed76745c5dc25b9786be8ac287e0b99b002654457 /tests
parentaefb24193809b473d8d3d137b678bcdc87dd52f6 (diff)
StackView::clear() allow specifying a transition
This turns out to be a useful feature wanted for the Coffee Machine demo, which is being cleaned up. [ChangeLog][Controls][StackView] Allowed specifying a transition when clearing the stack view. Change-Id: I12ed18ca24c247980bab1fe93e1810c0d25d85e7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controls/data/tst_stackview.qml18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_stackview.qml b/tests/auto/controls/data/tst_stackview.qml
index 8650df22..87601b71 100644
--- a/tests/auto/controls/data/tst_stackview.qml
+++ b/tests/auto/controls/data/tst_stackview.qml
@@ -498,6 +498,24 @@ TestCase {
compare(control.currentItem, item8)
}
+ function test_clear() {
+ var control = createTemporaryObject(stackView, testCase)
+ verify(control)
+
+ control.push(component, StackView.Immediate)
+
+ control.clear()
+ compare(control.depth, 0)
+ compare(control.busy, false)
+
+ control.push(component, StackView.Immediate)
+
+ control.clear(StackView.PopTransition)
+ compare(control.depth, 0)
+ compare(control.busy, true)
+ tryCompare(control, "busy", false)
+ }
+
function test_visibility_data() {
return [
{tag:"default transitions", properties: {}},