diff options
Diffstat (limited to 'tests/auto/quick/qquickshadereffect/tst_qquickshadereffect.cpp')
-rw-r--r-- | tests/auto/quick/qquickshadereffect/tst_qquickshadereffect.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickshadereffect/tst_qquickshadereffect.cpp b/tests/auto/quick/qquickshadereffect/tst_qquickshadereffect.cpp index a57b7d4c1f..6537a64889 100644 --- a/tests/auto/quick/qquickshadereffect/tst_qquickshadereffect.cpp +++ b/tests/auto/quick/qquickshadereffect/tst_qquickshadereffect.cpp @@ -85,6 +85,8 @@ private slots: void withoutQmlEngine(); + void hideParent(); + private: enum PresenceFlags { VertexPresent = 0x01, @@ -336,6 +338,18 @@ void tst_qquickshadereffect::withoutQmlEngine() delete window; } +// QTBUG-86402: hiding the parent of an item that uses an effect should not cause a crash. +void tst_qquickshadereffect::hideParent() +{ + QScopedPointer<QQuickView> view(new QQuickView); + view->setSource(testFileUrl("hideParent.qml")); + QCOMPARE(view->status(), QQuickView::Ready); + view->show(); + QVERIFY(QTest::qWaitForWindowExposed(view.data())); + // Should finish without crashing. + QTRY_VERIFY(view->rootObject()->property("finished").toBool()); +} + QTEST_MAIN(tst_qquickshadereffect) #include "tst_qquickshadereffect.moc" |