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.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index e023d705d9..9ac9898ed0 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -118,6 +118,7 @@ private slots:
void failures();
void fallbackLookups();
void fileImportsContainCxxTypes();
+ void finalProperty();
void flagEnum();
void flushBeforeCapture();
void fromBoolValue();
@@ -2120,6 +2121,16 @@ void tst_QmlCppCodegen::fileImportsContainCxxTypes()
QCOMPARE(o->objectName(), u"horst guenther"_s);
}
+void tst_QmlCppCodegen::finalProperty()
+{
+ QQmlEngine e;
+ QQmlComponent c(&e, QUrl(u"qrc:/qt/qml/TestTypes/finalUser.qml"_s));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(!o.isNull());
+ QCOMPARE(o->property("f").toInt(), 12);
+}
+
void tst_QmlCppCodegen::flagEnum()
{
QQmlEngine engine;