aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-02-17 17:47:48 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-02-17 17:47:48 +0100
commit72447b6dbf98ace65ec46559337243970a668d26 (patch)
tree8abf6553218b43b53823cef8f4a02b8522af9f3a /tests/auto
parent209739056ee7316d9d6e9406aede5465e3bdff84 (diff)
parent04d4dca69d526611b60ec32e873d5de51d10be4d (diff)
Merge dev into 5.7
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/quick/qquickwindow/data/windowattached.qml2
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickwindow/data/windowattached.qml b/tests/auto/quick/qquickwindow/data/windowattached.qml
index a9f052d55e..9d61a02452 100644
--- a/tests/auto/quick/qquickwindow/data/windowattached.qml
+++ b/tests/auto/quick/qquickwindow/data/windowattached.qml
@@ -9,6 +9,7 @@ Rectangle {
property Item contentItem: root.Window.contentItem
property int windowWidth: root.Window.width
property int windowHeight: root.Window.height
+ property var window: root.Window.window
Text {
objectName: "rectangleWindowText"
anchors.centerIn: parent
@@ -26,6 +27,7 @@ Rectangle {
property Item contentItem: Window.contentItem
property int windowWidth: Window.width
property int windowHeight: Window.height
+ property var window: Window.window
}
}
}
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index 8aeb449a85..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,11 +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