aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlvaluetypeproviders/testtypes.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-09-25 08:44:56 +0200
committerUlf Hermann <ulf.hermann@qt.io>2023-09-25 12:30:07 +0200
commit9c8d76b6ce036fe5e5f17cdcff3c6b22f15b4b65 (patch)
tree61964ea80c1cc6cd3ec14b11ded206e537b0acf6 /tests/auto/qml/qqmlvaluetypeproviders/testtypes.h
parentbcda7aa6e442a33203eb99b63427dcd1ad1fd343 (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. Pick-to: 6.6 6.5 Change-Id: Ib8fd01d329d5b45b27dfe117e168860c6a1d267f Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlvaluetypeproviders/testtypes.h')
-rw-r--r--tests/auto/qml/qqmlvaluetypeproviders/testtypes.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlvaluetypeproviders/testtypes.h b/tests/auto/qml/qqmlvaluetypeproviders/testtypes.h
index 252493fb99..16000584b0 100644
--- a/tests/auto/qml/qqmlvaluetypeproviders/testtypes.h
+++ b/tests/auto/qml/qqmlvaluetypeproviders/testtypes.h
@@ -98,6 +98,8 @@ public:
const QList<QSizeF> &sizes() const { return m_sizes; }
void setSizes(const QList<QSizeF> &sizes) { m_sizes = sizes; }
+ Q_INVOKABLE QList<QSizeF> sizesDetached() const { return m_sizes; }
+
private:
friend bool operator==(const StructuredValueType &a, const StructuredValueType &b)