diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-03-08 12:15:03 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-03-08 12:15:50 +0100 |
commit | 75423185e4b03fabfeeee403f3bd9a6063078ee6 (patch) | |
tree | 6ad81ff44dda72126463fd3473be1567638b2436 /tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | |
parent | a2d4f1610db204e42722f20ff64716a14dc109c0 (diff) | |
parent | 3879b3f883dd66feddc190eb8bad330367a31ace (diff) |
Merge remote-tracking branch 'origin/dev' into wip/scenegraphng
Change-Id: I05f4e29dd3435bb843f9b2250574a61d688d5992
Diffstat (limited to 'tests/auto/quick/qquickwindow/tst_qquickwindow.cpp')
-rw-r--r-- | tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp index 5d1897ab2d..ff8c80e3ae 100644 --- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp +++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp @@ -2033,6 +2033,7 @@ void tst_qquickwindow::attachedProperty() QCOMPARE(view.rootObject()->property("contentItem").value<QQuickItem*>(), view.contentItem()); QCOMPARE(view.rootObject()->property("windowWidth").toInt(), view.width()); QCOMPARE(view.rootObject()->property("windowHeight").toInt(), view.height()); + QCOMPARE(view.rootObject()->property("window").value<QQuickView*>(), &view); QQuickWindow *innerWindow = view.rootObject()->findChild<QQuickWindow*>("extraWindow"); QVERIFY(innerWindow); @@ -2045,6 +2046,13 @@ 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()); + QCOMPARE(text->property("window").value<QQuickWindow*>(), innerWindow); + + text->setParentItem(0); + QVERIFY(!text->property("contentItem").value<QQuickItem*>()); + QCOMPARE(text->property("windowWidth").toInt(), 0); + QCOMPARE(text->property("windowHeight").toInt(), 0); + QVERIFY(!text->property("window").value<QQuickWindow*>()); } class RenderJob : public QRunnable |