diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-01-31 10:42:11 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-02-02 17:21:59 +0000 |
commit | 6d8f6a7e406515df358bacc6f737f4fe5fae97ea (patch) | |
tree | 3539b9e9cfca060a70c0d33f3361ce5599e58476 /tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | |
parent | 7b38d8e0025aba6366fd2f222838cf99f6bd15f3 (diff) |
Window attached property: fix notifier signals
The change notifiers must be emitted when an item's window is
reset. Otherwise any existing bindings don't get re-evaluated,
and in worst scenario one ends up with dangling pointers.
Change-Id: I6075957f1447bb8628d25bd822345e45837c027a
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'tests/auto/quick/qquickwindow/tst_qquickwindow.cpp')
-rw-r--r-- | tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp index f53ade9541..c597cf03dd 100644 --- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp +++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp @@ -2050,6 +2050,11 @@ void tst_qquickwindow::attachedProperty() QCOMPARE(text->property("contentItem").value<QQuickItem*>(), innerWindow->contentItem()); QCOMPARE(text->property("windowWidth").toInt(), innerWindow->width()); QCOMPARE(text->property("windowHeight").toInt(), innerWindow->height()); + + text->setParentItem(0); + QVERIFY(!text->property("contentItem").value<QQuickItem*>()); + QCOMPARE(text->property("windowWidth").toInt(), 0); + QCOMPARE(text->property("windowHeight").toInt(), 0); } class RenderJob : public QRunnable |