aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2014-11-03 17:23:11 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2014-11-05 16:19:31 +0100
commit77711c65c1fdb6c5d94d26fef828959d29643516 (patch)
tree3a6d0e218f1e24863553d42a988fd225cd6144ab /tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
parent5280e866f76e38f2bf1c226ff896b4649194eec4 (diff)
Add attached Window::contentItem property
This is essential to the Qt Quick Controls for implementing floating text selection handle popups. Change-Id: Ibae65110a5db6d65dacd197fef3ad567d11342dc Reviewed-by: Alan Alpert <aalpert@blackberry.com> 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.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index 5bd7492d70..043203c256 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -1952,6 +1952,7 @@ void tst_qquickwindow::attachedProperty()
view.requestActivate();
QVERIFY(QTest::qWaitForWindowActive(&view));
QVERIFY(view.rootObject()->property("windowActive").toBool());
+ QCOMPARE(view.rootObject()->property("contentItem").value<QQuickItem*>(), view.contentItem());
QQuickWindow *innerWindow = view.rootObject()->findChild<QQuickWindow*>("extraWindow");
QVERIFY(innerWindow);
@@ -1961,6 +1962,7 @@ void tst_qquickwindow::attachedProperty()
QQuickText *text = view.rootObject()->findChild<QQuickText*>("extraWindowText");
QVERIFY(text);
QCOMPARE(text->text(), QLatin1String("active\nvisibility: 2"));
+ QCOMPARE(text->property("contentItem").value<QQuickItem*>(), innerWindow->contentItem());
}
class RenderJob : public QRunnable