summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-10-06 01:26:23 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-10-06 01:26:23 (GMT)
commitbb8ba98542e1ed363d4218b9a9a4e68a6c4b5337 (patch)
tree613c4221486656e0fd309afda56d72e46ec89b20 /tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
parent47284ca360c1875663207996740bf6ed6e93d364 (diff)
downloadQt-bb8ba98542e1ed363d4218b9a9a4e68a6c4b5337.zip
Qt-bb8ba98542e1ed363d4218b9a9a4e68a6c4b5337.tar.gz
Qt-bb8ba98542e1ed363d4218b9a9a4e68a6c4b5337.tar.bz2
Create Loader components in correct context
Task-number: QTBUG-13481
Diffstat (limited to 'tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
index 8d04616..1bde55b 100644
--- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
+++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
@@ -89,6 +89,7 @@ private slots:
void deleteComponentCrash();
void nonItem();
void vmeErrors();
+ void creationContext();
private:
QDeclarativeEngine engine;
@@ -562,6 +563,19 @@ void tst_QDeclarativeLoader::vmeErrors()
delete loader;
}
+// QTBUG-13481
+void tst_QDeclarativeLoader::creationContext()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("creationContext.qml"));
+
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+
+ QCOMPARE(o->property("test").toBool(), true);
+
+ delete o;
+}
+
QTEST_MAIN(tst_QDeclarativeLoader)
#include "tst_qdeclarativeloader.moc"