diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2022-06-10 11:23:20 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-06-10 14:41:32 +0200 |
| commit | 8e69558f2f7d44f83779f7e1f60f811dfab0c275 (patch) | |
| tree | b6a349959368d6bf6476822bc73fae84596c9810 /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | dbd108a7997f129004bbed523db75d4aa9d0ab6c (diff) | |
qmltyperegistrar: Parse value type lists
We need to generate isList properties for those, so that qmlcachegen and
qmllint can handle them.
Pick-to: 6.4
Fixes: QTBUG-104129
Change-Id: I7e632279a605694c2fd5f583c8a6dcf9968eb634
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 12 |
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 54be586e24..8733bf6b96 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -42,6 +42,7 @@ class tst_QmlCppCodegen : public QObject Q_OBJECT private slots: void simpleBinding(); + void cppValueTypeList(); void anchorsFill(); void signalHandler(); void idAccess(); @@ -160,6 +161,17 @@ void tst_QmlCppCodegen::simpleBinding() } } +void tst_QmlCppCodegen::cppValueTypeList() +{ + QQmlEngine engine; + QQmlComponent component(&engine, QUrl(u"qrc:/TestTypes/Test.qml"_s)); + QScopedPointer<QObject> object(component.create()); + QVERIFY2(!object.isNull(), component.errorString().toUtf8().constData()); + QCOMPARE(object->property("a").toInt(), 16); + QMetaObject::invokeMethod(object.data(), "incA"); + QCOMPARE(object->property("a").toInt(), 17); +} + void tst_QmlCppCodegen::anchorsFill() { QQmlEngine engine; |
