diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-09-25 08:44:56 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-09-26 17:49:23 +0000 |
commit | 00016ec8048cd32d3d93173fa3197433599bf086 (patch) | |
tree | fa4c9afe638077e653beecda8e1ab33809356a99 /tests/auto/qml/qqmlvaluetypeproviders/tst_qqmlvaluetypeproviders.cpp | |
parent | 729edeb34e1abd1ef7f738417043e519b2b86a01 (diff) |
QtQml: Check for isReference() before trying to write back
If we neglect this we get an assert further down the line.
Amends commit a824a6f060ec3a0000d7349649a3ab9e0570ecaa.
Change-Id: Ib8fd01d329d5b45b27dfe117e168860c6a1d267f
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 9c8d76b6ce036fe5e5f17cdcff3c6b22f15b4b65)
(cherry picked from commit c82d1eed1756ddbf0f51953ed9a51dff29d0ef90)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/qml/qqmlvaluetypeproviders/tst_qqmlvaluetypeproviders.cpp')
-rw-r--r-- | tests/auto/qml/qqmlvaluetypeproviders/tst_qqmlvaluetypeproviders.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlvaluetypeproviders/tst_qqmlvaluetypeproviders.cpp b/tests/auto/qml/qqmlvaluetypeproviders/tst_qqmlvaluetypeproviders.cpp index 5f4d7c1042..930ac11fbe 100644 --- a/tests/auto/qml/qqmlvaluetypeproviders/tst_qqmlvaluetypeproviders.cpp +++ b/tests/auto/qml/qqmlvaluetypeproviders/tst_qqmlvaluetypeproviders.cpp @@ -476,6 +476,9 @@ void tst_qqmlvaluetypeproviders::recursive() MyTypeObject *m = qobject_cast<MyTypeObject *>(o.data()); QCOMPARE(m->structured().p().x(), 76); + + // Recursive write back into a list detached from the property. + QCOMPARE(m->property("aa").toInt(), 12); } void tst_qqmlvaluetypeproviders::date() |