diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2016-06-10 06:09:45 +0400 |
---|---|---|
committer | Konstantin Ritt <ritt.ks@gmail.com> | 2016-06-16 12:44:21 +0000 |
commit | 99905cad78b51c2c13a23be8bb4e167479d88aa3 (patch) | |
tree | 95788145905d543168edc58a721713546c94fd6b /tests | |
parent | bbec66f60ce8d1828c4f08b8975a031212009beb (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.qml | 5 |
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) |