aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
-rw-r--r--tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index 8733bf6b96..9c1f83fa2f 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -138,6 +138,7 @@ private slots:
void valueTypeLists();
void boundComponents();
void invisibleListElementType();
+ void typePropertyClash();
};
void tst_QmlCppCodegen::simpleBinding()
@@ -2201,6 +2202,17 @@ void tst_QmlCppCodegen::invisibleListElementType()
QCOMPARE(ref.size(), 0);
}
+void tst_QmlCppCodegen::typePropertyClash()
+{
+ QQmlEngine engine;
+ engine.rootContext()->setContextProperty(u"size"_s, 5);
+ QQmlComponent c(&engine, QUrl(u"qrc:/TestTypes/typePropertyClash.qml"_s));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(!o.isNull());
+ QCOMPARE(o->objectName(), u"Size: 5"_s);
+}
+
void tst_QmlCppCodegen::runInterpreted()
{
#ifdef Q_OS_ANDROID