aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickwindow
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@qt.io>2017-06-26 18:38:27 +0200
committerJan Arve Saether <jan-arve.saether@qt.io>2017-07-11 16:44:33 +0200
commitb6e6e737f1a4a7e48989a6a036e25c238304802f (patch)
tree8d4b5940b92ad1fc94e46c1742acd9355e19e1d4 /tests/auto/quick/qquickwindow
parentd5b3f5da9cfa90fc43f29f3bdeec01884a47d6ca (diff)
parent4beee1a6dcc1be57aa6fb2a175dadc6ff298545d (diff)
Merge remote-tracking branch 'origin/dev' into wip/pointerhandler
Conflicts: examples/quick/shared/LauncherList.qml src/quick/items/qquickevents.cpp src/quick/items/qquickevents_p_p.h src/quick/items/qquickwindow.cpp tests/auto/quick/touchmouse/tst_touchmouse.cpp Change-Id: Id692d291455093fc72db61f1b854f3fc9190267b
Diffstat (limited to 'tests/auto/quick/qquickwindow')
-rw-r--r--tests/auto/quick/qquickwindow/BLACKLIST4
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp24
2 files changed, 24 insertions, 4 deletions
diff --git a/tests/auto/quick/qquickwindow/BLACKLIST b/tests/auto/quick/qquickwindow/BLACKLIST
deleted file mode 100644
index 157808fdbf..0000000000
--- a/tests/auto/quick/qquickwindow/BLACKLIST
+++ /dev/null
@@ -1,4 +0,0 @@
-[requestActivate]
-osx-10.11
-[attachedProperty]
-osx-10.11
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index 4fea13eb49..0c341b2663 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -388,6 +388,8 @@ private slots:
void testDragEventPropertyPropagation();
+ void findChild();
+
private:
QTouchDevice *touchDevice;
QTouchDevice *touchDeviceWithVelocity;
@@ -2875,6 +2877,28 @@ void tst_qquickwindow::testDragEventPropertyPropagation()
}
}
+void tst_qquickwindow::findChild()
+{
+ QQuickWindow window;
+
+ // QQuickWindow
+ // |_ QQuickWindow::contentItem
+ // | |_ QObject("contentItemChild")
+ // |_ QObject("viewChild")
+
+ QObject *windowChild = new QObject(&window);
+ windowChild->setObjectName("windowChild");
+
+ QObject *contentItemChild = new QObject(window.contentItem());
+ contentItemChild->setObjectName("contentItemChild");
+
+ QCOMPARE(window.findChild<QObject *>("windowChild"), windowChild);
+ QCOMPARE(window.findChild<QObject *>("contentItemChild"), contentItemChild);
+
+ QVERIFY(!window.contentItem()->findChild<QObject *>("viewChild")); // sibling
+ QCOMPARE(window.contentItem()->findChild<QObject *>("contentItemChild"), contentItemChild);
+}
+
QTEST_MAIN(tst_qquickwindow)
#include "tst_qquickwindow.moc"