aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick1/qdeclarativeitem/tst_qdeclarativeitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qtquick1/qdeclarativeitem/tst_qdeclarativeitem.cpp')
-rw-r--r--tests/auto/qtquick1/qdeclarativeitem/tst_qdeclarativeitem.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qtquick1/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/qtquick1/qdeclarativeitem/tst_qdeclarativeitem.cpp
index b244a24613..5b71f23f36 100644
--- a/tests/auto/qtquick1/qdeclarativeitem/tst_qdeclarativeitem.cpp
+++ b/tests/auto/qtquick1/qdeclarativeitem/tst_qdeclarativeitem.cpp
@@ -91,6 +91,7 @@ private slots:
void testQtQuick11Attributes();
void testQtQuick11Attributes_data();
void qtbug_16871();
+ void qtbug_21045();
private:
QDeclarativeEngine engine;
};
@@ -1365,6 +1366,18 @@ void tst_QDeclarativeItem::qtbug_16871()
delete o;
}
+void tst_QDeclarativeItem::qtbug_21045()
+{
+ QDeclarativeComponent component(&engine);
+ QGraphicsScene scene;
+ component.setData("import QtQuick 1.1\nItem{visible: false; focus: true}", QUrl::fromLocalFile("file:"));
+ QObject *o = component.create();
+ QDeclarativeItem* i = qobject_cast<QDeclarativeItem*>(o);
+ QVERIFY(i);
+ scene.addItem(i);
+ QVERIFY(!i->hasActiveFocus());
+}
+
QTEST_MAIN(tst_QDeclarativeItem)
#include "tst_qdeclarativeitem.moc"