aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp')
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index 5f6185ad01..fc54e069aa 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -258,6 +258,8 @@ private slots:
void valueTypeGroupPropertiesInBehavior();
+ void thisInQmlScope();
+
private:
QQmlEngine engine;
QStringList defaultImportPathList;
@@ -4171,6 +4173,19 @@ void tst_qqmllanguage::valueTypeGroupPropertiesInBehavior()
QCOMPARE(animation->property("easing").value<QEasingCurve>().type(), QEasingCurve::InOutQuad);
}
+void tst_qqmllanguage::thisInQmlScope()
+{
+ QQmlEngine engine;
+
+ QQmlComponent component(&engine, testFileUrl("thisInQmlScope.qml"));
+ QTRY_VERIFY(component.isReady());
+ VERIFY_ERRORS(0);
+ QScopedPointer<QObject> o(component.create());
+ QVERIFY(!o.isNull());
+ QCOMPARE(o->property("x"), QVariant(42));
+ QCOMPARE(o->property("y"), QVariant(42));
+}
+
QTEST_MAIN(tst_qqmllanguage)
#include "tst_qqmllanguage.moc"