diff options
author | Mitch Curtis <mitch.curtis@digia.com> | 2014-08-22 09:52:59 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@digia.com> | 2014-08-25 14:41:34 +0200 |
commit | 99fd3a6b22a7eabf2aff656a942b0b7e32093254 (patch) | |
tree | 42dfa3ea9d15a65b14dece777a4f9d0f20a97c2a /tests/auto/quick/qquickitem/tst_qquickitem.cpp | |
parent | 916ced089f37d96ca8ef1cdb938791247bd44b72 (diff) |
Remove references transforms have to items in QQuickItem's destructor.
In case they try to remove themselves from our list of transforms when
that list has already been destroyed after ~QQuickItem() has run.
Task-number: QTBUG-40877
Change-Id: Ie57f5dd1e8b791846f08629183974c771553c4bf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'tests/auto/quick/qquickitem/tst_qquickitem.cpp')
-rw-r--r-- | tests/auto/quick/qquickitem/tst_qquickitem.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp index a689887977..38dc8e0ac4 100644 --- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp @@ -167,6 +167,8 @@ private slots: void testSGInitializeAndInvalidate(); + void objectChildTransform(); + private: enum PaintOrderOp { @@ -1906,7 +1908,18 @@ void tst_qquickitem::testSGInitializeAndInvalidate() delete view.take(); QCOMPARE(invalidateSpy.size(), expected); } +} + +void tst_qquickitem::objectChildTransform() +{ + QQuickView view; + view.setSource(testFileUrl("objectChildTransform.qml")); + + QQuickItem *root = qobject_cast<QQuickItem*>(view.rootObject()); + QVERIFY(root); + root->setProperty("source", QString()); + // Shouldn't crash. } QTEST_MAIN(tst_qquickitem) |