From 6d8f6a7e406515df358bacc6f737f4fe5fae97ea Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sun, 31 Jan 2016 10:42:11 +0100 Subject: 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 --- tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/auto') 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(), innerWindow->contentItem()); QCOMPARE(text->property("windowWidth").toInt(), innerWindow->width()); QCOMPARE(text->property("windowHeight").toInt(), innerWindow->height()); + + text->setParentItem(0); + QVERIFY(!text->property("contentItem").value()); + QCOMPARE(text->property("windowWidth").toInt(), 0); + QCOMPARE(text->property("windowHeight").toInt(), 0); } class RenderJob : public QRunnable -- cgit v1.2.3