diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2022-06-24 14:40:02 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-07-11 13:37:26 +0200 |
| commit | e19328fb0fefdf60a111bb662bf6ce0df901ac8f (patch) | |
| tree | 8cdba6417ea5ab575e41f4c44bcbb5b5aca2d479 /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | 989e05a0b8240778c9f249edea5c9d27d68f8e0f (diff) | |
QmlCompiler: Allow storeNameSloppy to reset a property
We should not convert from undefined on storeNameSloppy. The reset is
intentional.
Task-number: QTBUG-104508
Change-Id: Iede88fe6331dd173c9e8ea0ec4200df2b8bd30eb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index a41e723cda..a05cdcc742 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -1468,6 +1468,12 @@ void tst_QmlCppCodegen::undefinedResets() person->setShoeSize(10); QCOMPARE(person->shoeSize(), 10); QCOMPARE(person->name(), u"Marge"_s); + + person->setName(u"no one"_s); + QCOMPARE(person->name(), u"no one"_s); + + person->setObjectName(u"the one"_s); + QCOMPARE(person->name(), u"Bart"_s); } void tst_QmlCppCodegen::innerObjectNonShadowable() |
