diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2023-08-23 17:00:25 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-08-25 20:36:33 +0200 |
| commit | ede3389a3e152d7436bda6a53dd93e8847ab026e (patch) | |
| tree | f04e3d7dd9d9225b9fb9ca30a1421d5e5d8ff3d5 /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | 3c506d0c65d355f9bd1d9b27da0315693c58c5ad (diff) | |
QmlCompiler: Allow setting values in sequences
Since we have write-back available now, this is not difficult anymore.
This does not yet cover setting properties of value type objects stored
in sequences such as "a[i].b = c". You can only set the whole element.
Task-number: QTBUG-116011
Change-Id: Id5f7a19125897602880e573d5f25b025f9b91f34
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index 6792947056..54020ab7c3 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -4236,6 +4236,8 @@ void tst_QmlCppCodegen::writeBack() Person *shadowable = person->property("shadowable").value<Person *>(); QVERIFY(shadowable); QCOMPARE(shadowable->area(), QRectF(40, 50, 16, 17)); + + QCOMPARE(person->property("ints"), QVariant::fromValue(QList<int>({12, 22, 2, 1, 0, 0, 33}))); } QTEST_MAIN(tst_QmlCppCodegen) |
