aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlengine
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlengine')
-rw-r--r--tests/auto/qml/qqmlengine/data/TypeofQmlProperty.qml6
-rw-r--r--tests/auto/qml/qqmlengine/tst_qqmlengine.cpp14
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlengine/data/TypeofQmlProperty.qml b/tests/auto/qml/qqmlengine/data/TypeofQmlProperty.qml
new file mode 100644
index 0000000000..2196543dc8
--- /dev/null
+++ b/tests/auto/qml/qqmlengine/data/TypeofQmlProperty.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.5
+
+Item {
+ property var someProp: 1
+ Component.onCompleted: console.log("typeof someProp:", typeof(someProp));
+}
diff --git a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
index cb911d0115..486a0b4e87 100644
--- a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
+++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
@@ -75,6 +75,8 @@ private slots:
void urlInterceptor_data();
void urlInterceptor();
+ void qmlContextProperties();
+
public slots:
QObject *createAQObjectForOwnershipTest ()
{
@@ -778,6 +780,18 @@ void tst_qqmlengine::urlInterceptor()
QCOMPARE(o->property("absoluteUrl").toString(), expectedAbsoluteUrl);
}
+void tst_qqmlengine::qmlContextProperties()
+{
+ QQmlEngine e;
+
+ QQmlComponent c(&e, testFileUrl("TypeofQmlProperty.qml"));
+ QObject *o = c.create();
+ if (!o) {
+ qDebug() << c.errorString();
+ }
+ QVERIFY(o);
+}
+
QTEST_MAIN(tst_qqmlengine)
#include "tst_qqmlengine.moc"