diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-12-03 18:15:00 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-12-04 10:28:53 +0000 |
commit | 435c23be984691e3de645ae8ddff440e5f1786dd (patch) | |
tree | 7a8db0e26a217004beeeb55fb6d44a822538117a /tests | |
parent | 4ecb85d4468782378c091e42d5733a976a3e0307 (diff) |
StackView: fix crash when attempting to transition null items
Don't attempt to kick off view transitions for stack elements that have
failed to load.
Change-Id: I6e42785a30abc815d14a07e7d16aad5bde66391d
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/controls/data/tst_stackview.qml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_stackview.qml b/tests/auto/controls/data/tst_stackview.qml index 23eaf317..1cd12af3 100644 --- a/tests/auto/controls/data/tst_stackview.qml +++ b/tests/auto/controls/data/tst_stackview.qml @@ -744,4 +744,17 @@ TestCase { control.destroy() } + + function test_failures() { + var control = stackView.createObject(testCase, {initialItem: component}) + verify(control) + + ignoreWarning("QQmlComponent: Component is not ready") + control.push("non-existent.qml") + ignoreWarning("QQmlComponent: Component is not ready") + control.replace("non-existent.qml") + control.pop() + + control.destroy() + } } |