summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
diff options
context:
space:
mode:
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"