aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-01-05 21:00:40 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-01-09 21:40:52 +0100
commit40f394ef2e06a6466445e4df54735250939084f0 (patch)
tree815635f1adf7b2dee2ee271e9092f96695c41936 /tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
parentb40a2a881291b3eaea4b4834a162091537e6a34e (diff)
Add Window.width and Window.height attached properties
[ChangeLog][QtQuick] Added Window.width and Window.height attached properties Change-Id: I3ef590a0d3e6fa660ed88992d5ae843deb09c7bc Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'tests/auto/quick/qquickwindow/tst_qquickwindow.cpp')
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index 7c94cf6d17..e019c57ccb 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -1978,6 +1978,8 @@ void tst_qquickwindow::attachedProperty()
QVERIFY(QTest::qWaitForWindowActive(&view));
QVERIFY(view.rootObject()->property("windowActive").toBool());
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());
QQuickWindow *innerWindow = view.rootObject()->findChild<QQuickWindow*>("extraWindow");
QVERIFY(innerWindow);
@@ -1988,6 +1990,8 @@ void tst_qquickwindow::attachedProperty()
QVERIFY(text);
QCOMPARE(text->text(), QLatin1String("active\nvisibility: 2"));
QCOMPARE(text->property("contentItem").value<QQuickItem*>(), innerWindow->contentItem());
+ QCOMPARE(text->property("windowWidth").toInt(), innerWindow->width());
+ QCOMPARE(text->property("windowHeight").toInt(), innerWindow->height());
}
class RenderJob : public QRunnable