aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2016-01-22 15:20:47 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2016-01-22 15:21:06 +0100
commitf286db98ee41a8aa71b9a65a235b6d3e265d79f4 (patch)
tree16e17d4c52d35f7e55fc2103db5c96850e9bdfff /tests/auto/quick/qquickitem2/tst_qquickitem.cpp
parentce093497f2d4164fa8abc06cf976f9e36798e11e (diff)
parentb60a5dc9405ce89d7a742abc81b906d5c8cf5f7d (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Diffstat (limited to 'tests/auto/quick/qquickitem2/tst_qquickitem.cpp')
-rw-r--r--tests/auto/quick/qquickitem2/tst_qquickitem.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
index 34209ee610..607dbccaed 100644
--- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
@@ -69,6 +69,7 @@ private slots:
void nextItemInFocusChain3();
void tabFence();
+ void qtbug_50516();
void keys();
void standardKeys_data();
@@ -1190,6 +1191,27 @@ void tst_QQuickItem::tabFence()
verifyTabFocusChain(window, fence1BacktabFocusChain, false /* forward */);
}
+void tst_QQuickItem::qtbug_50516()
+{
+ QQuickView *window = new QQuickView(0);
+ window->setBaseSize(QSize(800,600));
+
+ window->setSource(testFileUrl("qtbug_50516.qml"));
+ window->show();
+ window->requestActivate();
+ QVERIFY(QTest::qWaitForWindowActive(window));
+ QVERIFY(QGuiApplication::focusWindow() == window);
+ QVERIFY(window->rootObject()->hasActiveFocus());
+
+ QQuickItem *contentItem = window->rootObject();
+ QQuickItem *next = contentItem->nextItemInFocusChain(true);
+ QCOMPARE(next, contentItem);
+ next = contentItem->nextItemInFocusChain(false);
+ QCOMPARE(next, contentItem);
+
+ delete window;
+}
+
void tst_QQuickItem::keys()
{
QQuickView *window = new QQuickView(0);