diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2024-02-26 12:44:21 +0100 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-02-29 12:08:08 +0100 |
| commit | 69ca18785c6693b6cf167dc95275a19399c7f4e1 (patch) | |
| tree | 5b74f6b59ab8404d690269d98b6c08fee6f129c1 /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | 7da544e862a92cc0a9d97cbed68a35c532699116 (diff) | |
QQmlPropertyCache: Correctly set flags when loading methods
We commonly load multiple methods in sequence into the same
QQmlPropertyData. We need to set all the relevant flags for each one.
Otherwise the wrong flags are transferred to subsequent methods.
Pick-to: 6.7 6.6 6.5
Task-number: QTBUG-112366
Change-Id: I7432500b9149fdd8dd2dd98eb923ada70232fb6d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index da8652acf5..4c33098235 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -3771,6 +3771,14 @@ void tst_QmlCppCodegen::overriddenProperty() QCOMPARE(child->objectName(), u"double"_s); QMetaObject::invokeMethod(child, "doArray"); QCOMPARE(child->objectName(), u"javaScript"_s); + + QMetaObject::invokeMethod(child, "doString2"); + QCOMPARE(child->objectName(), u"string"_s); + QMetaObject::invokeMethod(child, "doNumber2"); + QCOMPARE(child->objectName(), u"double"_s); + QMetaObject::invokeMethod(child, "doArray2"); + QCOMPARE(child->objectName(), u"javaScript"_s); + QMetaObject::invokeMethod(child, "doFoo"); QCOMPARE(child->objectName(), u"ObjectWithMethod"_s); |
