<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/qml, branch 6.5.2</title>
<subtitle>Qt Declarative (Quick 2)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/'/>
<entry>
<title>QML: Try QML conversion before metatype conversion</title>
<updated>2023-06-17T06:06:10+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2023-06-14T08:54:50+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=8e3b18734c60596a30a3f260197ef64218f0ae5a'/>
<id>8e3b18734c60596a30a3f260197ef64218f0ae5a</id>
<content type='text'>
and guard against null gadgetPtr. This is what we get for uninitialized
value type properties.

Fixes: QTBUG-114494
Change-Id: I86ad23abcc4fec219017d1aad6b7add1c9a9af5d
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit a2104034d404179f5fad98fd54a133b288ded47d)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and guard against null gadgetPtr. This is what we get for uninitialized
value type properties.

Fixes: QTBUG-114494
Change-Id: I86ad23abcc4fec219017d1aad6b7add1c9a9af5d
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit a2104034d404179f5fad98fd54a133b288ded47d)
</pre>
</div>
</content>
</entry>
<entry>
<title>QML: Allow creating constructible value types from variant objects</title>
<updated>2023-06-17T06:06:07+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2023-06-14T06:32:13+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=c07cc979335216a034a3958780150d301e996f67'/>
<id>c07cc979335216a034a3958780150d301e996f67</id>
<content type='text'>
VariantObject as source for value type constructions should work the
same way as other types.

Change-Id: I35770adf0486b404673ee00800fb1d3e429a23cf
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 0bb0eeeb09580de8bccef996f9b4099fb7d1b482)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
VariantObject as source for value type constructions should work the
same way as other types.

Change-Id: I35770adf0486b404673ee00800fb1d3e429a23cf
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 0bb0eeeb09580de8bccef996f9b4099fb7d1b482)
</pre>
</div>
</content>
</entry>
<entry>
<title>CMake: Remove superfluous depfile in QML type registration</title>
<updated>2023-06-16T04:10:09+00:00</updated>
<author>
<name>Joerg Bornemann</name>
<email>joerg.bornemann@qt.io</email>
</author>
<published>2023-06-13T06:29:52+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=ec5fee55ef1596db95d6f0ebcdf256b1ffd5da02'/>
<id>ec5fee55ef1596db95d6f0ebcdf256b1ffd5da02</id>
<content type='text'>
In _qt_internal_qml_type_registration we created a depfile that
contained the *_metatypes.json files of target's SOURCES.

This depfile was used in the custom command that produces
${target}_qmltyperegistration.cpp.

It doesn't seem necessary to create a depfile, and one could use the
DEPENDS option of add_custom_command instead. And indeed, commit
ce950d619aef3ad0534544b2e029a6f025b256a5 added the same dependencies
this way. Presumably, this was done to fix dependencies for older CMake
versions and generators that do not support depfiles.

This commit removes the creation of the depfile.

This double dependency declaration was found when investigating
QTBUG-106683, and it turns out that removing the depfile fixes the
problem of re-generating ${target}_qmltyperegistration.cpp for Visual
Studio generators.

Task-number: QTBUG-106683
Change-Id: I6cf909dfb4a9b31b76599b7ad35ad6f595ca0891
Reviewed-by: Alexey Edelev &lt;alexey.edelev@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 470fee3217794c66f0eaf19f1a3cb229cfb85fc1)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In _qt_internal_qml_type_registration we created a depfile that
contained the *_metatypes.json files of target's SOURCES.

This depfile was used in the custom command that produces
${target}_qmltyperegistration.cpp.

It doesn't seem necessary to create a depfile, and one could use the
DEPENDS option of add_custom_command instead. And indeed, commit
ce950d619aef3ad0534544b2e029a6f025b256a5 added the same dependencies
this way. Presumably, this was done to fix dependencies for older CMake
versions and generators that do not support depfiles.

This commit removes the creation of the depfile.

This double dependency declaration was found when investigating
QTBUG-106683, and it turns out that removing the depfile fixes the
problem of re-generating ${target}_qmltyperegistration.cpp for Visual
Studio generators.

Task-number: QTBUG-106683
Change-Id: I6cf909dfb4a9b31b76599b7ad35ad6f595ca0891
Reviewed-by: Alexey Edelev &lt;alexey.edelev@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 470fee3217794c66f0eaf19f1a3cb229cfb85fc1)
</pre>
</div>
</content>
</entry>
<entry>
<title>QQmlConnections: make overridden virtual functions protected</title>
<updated>2023-06-12T01:48:05+00:00</updated>
<author>
<name>Tim Blechmann</name>
<email>tim@klingt.org</email>
</author>
<published>2023-06-07T09:34:52+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=13c812098fc69f90b72eabe89f45e26ebbec0457'/>
<id>13c812098fc69f90b72eabe89f45e26ebbec0457</id>
<content type='text'>
QQmlConnections overrides classBegin and componentComplete from
QQmlParserStatus. the purely virtual functions are public, but the
overridden functions are private.

this causes compile errors with qmltc generated code.

Change-Id: Ic586265412cbbec945a04bd2313f499738a10675
Task-Id: QTBUG-114359
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
(cherry picked from commit d59e43d0a3e7b3a40d25f4476e1b51d0045a2018)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
QQmlConnections overrides classBegin and componentComplete from
QQmlParserStatus. the purely virtual functions are public, but the
overridden functions are private.

this causes compile errors with qmltc generated code.

Change-Id: Ic586265412cbbec945a04bd2313f499738a10675
Task-Id: QTBUG-114359
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
(cherry picked from commit d59e43d0a3e7b3a40d25f4476e1b51d0045a2018)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QtQml: Do not retroactively detach or re-attach methods</title>
<updated>2023-06-09T19:35:35+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2023-06-05T09:49:51+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=f7f9aa00aac0f994fa54097c0674280f99a277b8'/>
<id>f7f9aa00aac0f994fa54097c0674280f99a277b8</id>
<content type='text'>
If a method is attached to an object it means that it was stored in a
property. The property can be re-assigned, with a different method from
a different thisObject. We cannot re-use it at all when invoking the
lookup again.

There are a few cases we care about:

1. The lookup immediately calls the property.
   a, The lookup retrieves a method. The method will be detached from
      the get go. There is no ambiguity (unless it's overridden).
   b, The lookup retrieves a var property with a method inside. The
      method will be attached to its original thisObject. The method may
      have been replaced with something else in the mean time.
      Therefore, we re-fetch the value on each call. Since we already
      have a QV4::QObjectMethod in the property, we don't need to
      rebuild it. So the lookup is still not expensive.
2. The lookup stores the property in a local.
   a, The lookup retrieves a method. The method will be attached,
      signaling any future callers that they need to be careful here.
   b, The lookup retrieves a var property with a method inside. The
      method is already attached to its original thisObject and stays
      that way.
3. We call a local that contains a method. This can only be a method
   that contains a thisObject. We may still decide to use the thisObject
   as provided by the call, depending on the NativeMethodBehavior
   pragma.

Fixes: QTBUG-114086
Change-Id: Ia9a9c06355fd7d5052cdf79ac3ffddfa32f56573
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 3c0b8076e79f64b5ba575fca7ac62c6a1b740ce4)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a method is attached to an object it means that it was stored in a
property. The property can be re-assigned, with a different method from
a different thisObject. We cannot re-use it at all when invoking the
lookup again.

There are a few cases we care about:

1. The lookup immediately calls the property.
   a, The lookup retrieves a method. The method will be detached from
      the get go. There is no ambiguity (unless it's overridden).
   b, The lookup retrieves a var property with a method inside. The
      method will be attached to its original thisObject. The method may
      have been replaced with something else in the mean time.
      Therefore, we re-fetch the value on each call. Since we already
      have a QV4::QObjectMethod in the property, we don't need to
      rebuild it. So the lookup is still not expensive.
2. The lookup stores the property in a local.
   a, The lookup retrieves a method. The method will be attached,
      signaling any future callers that they need to be careful here.
   b, The lookup retrieves a var property with a method inside. The
      method is already attached to its original thisObject and stays
      that way.
3. We call a local that contains a method. This can only be a method
   that contains a thisObject. We may still decide to use the thisObject
   as provided by the call, depending on the NativeMethodBehavior
   pragma.

Fixes: QTBUG-114086
Change-Id: Ia9a9c06355fd7d5052cdf79ac3ffddfa32f56573
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 3c0b8076e79f64b5ba575fca7ac62c6a1b740ce4)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QML: Call value type ctors with derived types of formal parameter</title>
<updated>2023-06-09T19:34:52+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2023-06-08T11:05:33+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=4178c6c6c1c8b231b1e254065c5e03f731e58fe7'/>
<id>4178c6c6c1c8b231b1e254065c5e03f731e58fe7</id>
<content type='text'>
If you pass an argument of a derived type to a ctor that's declared to
accept the base type, this will generally work, even if no QMetaType
conversion is explicitly declared.

Task-number: QTBUG-113752
Change-Id: I0364c2d6b2a1b0f6c067b5a4fd5c000e483afca6
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
(cherry picked from commit 01427bd0d9fc74794f6cfb22650aa5f7fdcbda76)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If you pass an argument of a derived type to a ctor that's declared to
accept the base type, this will generally work, even if no QMetaType
conversion is explicitly declared.

Task-number: QTBUG-113752
Change-Id: I0364c2d6b2a1b0f6c067b5a4fd5c000e483afca6
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
(cherry picked from commit 01427bd0d9fc74794f6cfb22650aa5f7fdcbda76)
</pre>
</div>
</content>
</entry>
<entry>
<title>Qml: Construct value types by properties from any object-likes</title>
<updated>2023-06-09T09:49:35+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2023-06-01T10:54:23+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=052c15ae8349fd757e9a042012697021c40ead96'/>
<id>052c15ae8349fd757e9a042012697021c40ead96</id>
<content type='text'>
Since we allow any object to be used for property-by-property
construction when encoded as QJSValue, we should do the same when it's
encoded as QVariant.

This allows us to use typed modelData in delegates. The modelData's type
only has to be a structured value. Any matching data from the model will
then be inserted.

Fixes: QTBUG-113752
Change-Id: I200e9acac3c6c302c9dedf8e7e1ccd6c9fdf5eb6
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 062843124470e90ada7323b0734ff35addb0a9cb)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since we allow any object to be used for property-by-property
construction when encoded as QJSValue, we should do the same when it's
encoded as QVariant.

This allows us to use typed modelData in delegates. The modelData's type
only has to be a structured value. Any matching data from the model will
then be inserted.

Fixes: QTBUG-113752
Change-Id: I200e9acac3c6c302c9dedf8e7e1ccd6c9fdf5eb6
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 062843124470e90ada7323b0734ff35addb0a9cb)
</pre>
</div>
</content>
</entry>
<entry>
<title>QML: Re-add QMetaType::convert() attempt for argument conversion</title>
<updated>2023-06-09T07:35:32+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2023-06-07T07:27:39+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=56a4c899225db8b8badc50a2553e1352c06893f0'/>
<id>56a4c899225db8b8badc50a2553e1352c06893f0</id>
<content type='text'>
There are people who depend on QMetaType to convert their types. This is
not nice, but removing it breaks compatibility.

Fixes: QTBUG-114340
Change-Id: I0a7f54b8fd0f77b71e7e56f65ef7d6f91c876237
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
(cherry picked from commit 761b455d4741bdbef47845623d6f44bdc8a464b5)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are people who depend on QMetaType to convert their types. This is
not nice, but removing it breaks compatibility.

Fixes: QTBUG-114340
Change-Id: I0a7f54b8fd0f77b71e7e56f65ef7d6f91c876237
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
(cherry picked from commit 761b455d4741bdbef47845623d6f44bdc8a464b5)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QML: Allow coercing variant objects to their own type</title>
<updated>2023-06-09T07:35:32+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2023-06-07T07:40:00+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=1d482737860b22f7419d0e57d993bb3247f4a014'/>
<id>1d482737860b22f7419d0e57d993bb3247f4a014</id>
<content type='text'>
This allows passing unregistered value types through QML.

Task-number: QTBUG-114340
Change-Id: I6fa5adadf2d406d2d5f3a83fb922e9d547e7ead9
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit cd16a5ffb9d798b08dba0cdfbef045b4b2dd0f08)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows passing unregistered value types through QML.

Task-number: QTBUG-114340
Change-Id: I6fa5adadf2d406d2d5f3a83fb922e9d547e7ead9
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit cd16a5ffb9d798b08dba0cdfbef045b4b2dd0f08)
</pre>
</div>
</content>
</entry>
<entry>
<title>Doc: Fix ambiguous link</title>
<updated>2023-06-07T07:23:05+00:00</updated>
<author>
<name>Andreas Eliasson</name>
<email>andreas.eliasson@qt.io</email>
</author>
<published>2023-06-02T09:52:25+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=e7abf72b54afbfa3d78c5e6b1ec812a560dbf942'/>
<id>e7abf72b54afbfa3d78c5e6b1ec812a560dbf942</id>
<content type='text'>
Using square brackets to disambiguate a link doesn't seem to work with
the \sa command. For now, re-write to use \l to make sure the link goes
to where it's supposed to.

Task-number: QTBUG-114073
Change-Id: Id23844df752c30a8d02a362e91632ad2339ad8e8
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 91d870855d4a9b84cbff4cf8680f26c6d3bf90eb)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using square brackets to disambiguate a link doesn't seem to work with
the \sa command. For now, re-write to use \l to make sure the link goes
to where it's supposed to.

Task-number: QTBUG-114073
Change-Id: Id23844df752c30a8d02a362e91632ad2339ad8e8
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 91d870855d4a9b84cbff4cf8680f26c6d3bf90eb)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
