<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/tests/auto/qml/qqmlproperty, branch dev</title>
<subtitle>Qt Declarative (Quick 2)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/'/>
<entry>
<title>QQmlPropertyToPropertyBinding: Use JS type coercion</title>
<updated>2026-04-22T08:21:32+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2026-04-20T06:33:50+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=7c8cb7eb67df93ef6232ef498c97f460e822a984'/>
<id>7c8cb7eb67df93ef6232ef498c97f460e822a984</id>
<content type='text'>
When QAbstractItemModel::data() returns an invalid QVariant (representing
'undefined' in JS) for a role bound to a typed property like
'required property string foo', the property-to-property binding's write
was silently failing. This happened because writeValueProperty() only uses
QMetaType conversions which cannot convert an invalid QVariant to a
QString. The property kept its old value, and subsequent valid writes
of the same value would not trigger change signals.

Update QQmlPropertyToUnbindablePropertyBinding::update() to perform
proper type coercion using metaTypeToJS() and metaTypeFromJS().

Pick-to: 6.11
Fixes: QTBUG-145016
Change-Id: I8421e813ddde50d4c252907045448b22a36a0a70
Reviewed-by: Olivier De Cannière &lt;olivier.decanniere@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When QAbstractItemModel::data() returns an invalid QVariant (representing
'undefined' in JS) for a role bound to a typed property like
'required property string foo', the property-to-property binding's write
was silently failing. This happened because writeValueProperty() only uses
QMetaType conversions which cannot convert an invalid QVariant to a
QString. The property kept its old value, and subsequent valid writes
of the same value would not trigger change signals.

Update QQmlPropertyToUnbindablePropertyBinding::update() to perform
proper type coercion using metaTypeToJS() and metaTypeFromJS().

Pick-to: 6.11
Fixes: QTBUG-145016
Change-Id: I8421e813ddde50d4c252907045448b22a36a0a70
Reviewed-by: Olivier De Cannière &lt;olivier.decanniere@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/*: port away from contextless 3-arg QObject::connect</title>
<updated>2026-01-14T13:00:20+00:00</updated>
<author>
<name>Ahmad Samir</name>
<email>a.samirh78@gmail.com</email>
</author>
<published>2025-11-04T18:54:10+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=57420b31f760b5c9c2df30010752f3595ac9043a'/>
<id>57420b31f760b5c9c2df30010752f3595ac9043a</id>
<content type='text'>
Pick-to: 6.11 6.10
Task-number: QTBUG-116296
Change-Id: Icc82fbf1bda7ec940940171b5f7ed786e00a274c
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pick-to: 6.11 6.10
Task-number: QTBUG-116296
Change-Id: Icc82fbf1bda7ec940940171b5f7ed786e00a274c
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace QVector with QList</title>
<updated>2026-01-09T19:44:46+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2026-01-08T18:16:07+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=941445ba18c8003948dc9bb9e257114ca13e12fb'/>
<id>941445ba18c8003948dc9bb9e257114ca13e12fb</id>
<content type='text'>
Since QVector is just an alias, let's finally do what we could have
done for Qt 6.0.

Pick-to: 6.11
Change-Id: Ia9dbc8ecf4f099339cf7639acb22c14b24fa680b
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since QVector is just an alias, let's finally do what we could have
done for Qt 6.0.

Pick-to: 6.11
Change-Id: Ia9dbc8ecf4f099339cf7639acb22c14b24fa680b
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Extract type conversion into helper</title>
<updated>2025-10-28T11:21:53+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2025-10-17T13:02:36+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=93aee2759bb953cb27178f840d9da3959d2de277'/>
<id>93aee2759bb953cb27178f840d9da3959d2de277</id>
<content type='text'>
We need this in Binding, too, and extracting this part of the code for
better unit testing is arguably a good idea anyway.

Task-number: QTBUG-140858
Pick-to: 6.10 6.8
Change-Id: I74f7a4f022068b9f599cf55433b5e337bc002178
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need this in Binding, too, and extracting this part of the code for
better unit testing is arguably a good idea anyway.

Task-number: QTBUG-140858
Pick-to: 6.10 6.8
Change-Id: I74f7a4f022068b9f599cf55433b5e337bc002178
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QtQml: Fix assigning to QML-defined list properties</title>
<updated>2025-10-02T05:35:46+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2025-09-30T12:54:36+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=7fa397156c831b410b551c2ad84d17f2eaf9e5c6'/>
<id>7fa397156c831b410b551c2ad84d17f2eaf9e5c6</id>
<content type='text'>
Returning an invalid QVariant from toVariant() is not helpful. We can't
produce a QQmlListReference in that case because there is no object,
but a QObjectList works just fine.

Writing to list properties via the metaobject is very much supported.
We can easily implement it using the same technique we use for reading.

Finally, to get the signal counts right, we also need to compare the
lists before assignment when taking the QQmlProperty code path.

Pick-to: 6.10 6.8
Fixes: QTBUG-140690
Change-Id: I09d6412f3f2ec86144810f47d0d620b63dfcd280
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Returning an invalid QVariant from toVariant() is not helpful. We can't
produce a QQmlListReference in that case because there is no object,
but a QObjectList works just fine.

Writing to list properties via the metaobject is very much supported.
We can easily implement it using the same technique we use for reading.

Finally, to get the signal counts right, we also need to compare the
lists before assignment when taking the QQmlProperty code path.

Pick-to: 6.10 6.8
Fixes: QTBUG-140690
Change-Id: I09d6412f3f2ec86144810f47d0d620b63dfcd280
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QtQml: Deprecate QQmlPropertyMap default ctor</title>
<updated>2025-10-01T10:07:00+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2025-09-29T08:10:08+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=a629e9e8f64aad7a75404166213645702ab64965'/>
<id>a629e9e8f64aad7a75404166213645702ab64965</id>
<content type='text'>
It's dangerous since you can't use it for derived classes. Instead,
provide a factory function.

Make it possible to specialize the QQmlElement ctor so that we can plug
in the two-argument QQmlPropertyMap ctor when someone explicitly
registers QQmlPropertyMap as creatable type (such as tst_qqmlpropertymap
does).

Fixes: QTBUG-140554
Change-Id: I264156ae27e5e234daad47fec3e0333f3ea89f4a
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's dangerous since you can't use it for derived classes. Instead,
provide a factory function.

Make it possible to specialize the QQmlElement ctor so that we can plug
in the two-argument QQmlPropertyMap ctor when someone explicitly
registers QQmlPropertyMap as creatable type (such as tst_qqmlpropertymap
does).

Fixes: QTBUG-140554
Change-Id: I264156ae27e5e234daad47fec3e0333f3ea89f4a
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQmlDataTest: drop default try timeout from 5 seconds to 1</title>
<updated>2025-08-07T02:45:29+00:00</updated>
<author>
<name>Mitch Curtis</name>
<email>mitch.curtis@qt.io</email>
</author>
<published>2025-06-27T04:08:06+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=e7b90cfc31e9b651fd4895944f84d78aa637f120'/>
<id>e7b90cfc31e9b651fd4895944f84d78aa637f120</id>
<content type='text'>
Make debugging of failing tests less painful.

The tests that had to be changed as a result are listed
in the comments of the linked task.

Fixes: QTBUG-138662
Task-number: QTBUG-81979
Change-Id: Iee50f2d4f2160e3e9bc2c7985925583fad810811
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make debugging of failing tests less painful.

The tests that had to be changed as a result are listed
in the comments of the linked task.

Fixes: QTBUG-138662
Task-number: QTBUG-81979
Change-Id: Iee50f2d4f2160e3e9bc2c7985925583fad810811
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQmlProperty: Fix read of value type lists</title>
<updated>2025-05-13T07:52:20+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2025-05-12T13:16:20+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=e96ad30e430a95f8cb40379f08f0166d5ac3c855'/>
<id>e96ad30e430a95f8cb40379f08f0166d5ac3c855</id>
<content type='text'>
When we introduced value type lists, we didn't adjust the QQmlProperty
code which assumed that any list property could be represented as
QQmlListProperty.

This was of course no longer the case, and attempting to use it with
such a property would result in UB, and most likely in crashes.

Fix this by detecting what kind of list we are dealing with.

Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-136735
Change-Id: I1e4531da3e5f26994809f02d630820541849691c
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we introduced value type lists, we didn't adjust the QQmlProperty
code which assumed that any list property could be represented as
QQmlListProperty.

This was of course no longer the case, and attempting to use it with
such a property would result in UB, and most likely in crashes.

Fix this by detecting what kind of list we are dealing with.

Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-136735
Change-Id: I1e4531da3e5f26994809f02d630820541849691c
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QtQml: Fix context traversal in QQmlProperty</title>
<updated>2025-04-11T08:32:57+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2025-04-10T12:52:08+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=a55a85ecca0220b2bf9df717ee2696dffbef331f'/>
<id>a55a85ecca0220b2bf9df717ee2696dffbef331f</id>
<content type='text'>
We need to retrieve the object from the current context, not from the
innermost one.

Amends commit 21f15ede606df028479335c64c333db5fb1bb3f7

Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-134778
Change-Id: I1abc24dfdbb1c2f0d61a2848ad55e441cdda54a9
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to retrieve the object from the current context, not from the
innermost one.

Amends commit 21f15ede606df028479335c64c333db5fb1bb3f7

Pick-to: 6.9 6.8 6.5
Fixes: QTBUG-134778
Change-Id: I1abc24dfdbb1c2f0d61a2848ad55e441cdda54a9
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ObjectCreator: Ensure alias property signals are emitted correctly</title>
<updated>2025-02-04T15:50:22+00:00</updated>
<author>
<name>Wang Chuan</name>
<email>ouchuanm@outlook.com</email>
</author>
<published>2025-02-01T06:48:10+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=e1bf7e52c1e6fbf79f6b656076ac77d9d42610fd'/>
<id>e1bf7e52c1e6fbf79f6b656076ac77d9d42610fd</id>
<content type='text'>
Alias property signals were only connected when their corresponding
signal handlers were explicitly defined in QML. This approach missed
cases where signal handlers are created and connected in C++ code,
causing alias property changes to fail to emit their signals.

Fixes: QTBUG-120951
Change-Id: Ia84b078795e9c89668f916de92c1be41f07b6694
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Alias property signals were only connected when their corresponding
signal handlers were explicitly defined in QML. This approach missed
cases where signal handlers are created and connected in C++ code,
causing alias property changes to fail to emit their signals.

Fixes: QTBUG-120951
Change-Id: Ia84b078795e9c89668f916de92c1be41f07b6694
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
