aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2016-06-10 06:09:45 +0400
committerKonstantin Ritt <ritt.ks@gmail.com>2016-06-16 12:44:21 +0000
commit99905cad78b51c2c13a23be8bb4e167479d88aa3 (patch)
tree95788145905d543168edc58a721713546c94fd6b /tests
parentbbec66f60ce8d1828c4f08b8975a031212009beb (diff)
StackView: Fix warning when popping down to the current item
findElement() is unable to find currentItem cause the most top element has been popped just few lines above, leading to "pop: unknown argument: .." warning where it shouldn't really do. Change-Id: I90d4ea6acaf09b861af281d9c0e23bc42a6eb503 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controls/data/tst_stackview.qml5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_stackview.qml b/tests/auto/controls/data/tst_stackview.qml
index 9966fa47..6d0433d4 100644
--- a/tests/auto/controls/data/tst_stackview.qml
+++ b/tests/auto/controls/data/tst_stackview.qml
@@ -406,6 +406,11 @@ TestCase {
compare(control.depth, 6)
compare(control.currentItem, items[5])
+ // pop down to the current item
+ compare(control.pop(control.currentItem, StackView.Immediate), null)
+ compare(control.depth, 6)
+ compare(control.currentItem, items[5])
+
// pop down to (but not including) the Nth item
compare(control.pop(items[3], StackView.Immediate), items[5])
compare(control.depth, 4)