<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/qml, branch wip/nativemenus</title>
<subtitle>Qt Declarative (Quick 2)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/'/>
<entry>
<title>TypedArray: Preserve exact NaN bit pattern on fill()</title>
<updated>2024-05-25T06:11:34+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2024-05-23T09:27:27+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=2818506ba357e7912af20b5a8d24607e38f2dfb4'/>
<id>2818506ba357e7912af20b5a8d24607e38f2dfb4</id>
<content type='text'>
... as required by ECMAScript.

Pick-to: 6.7 6.5
Change-Id: I31bc7e6a87e404a8e6d314c99f163f82208e13a1
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... as required by ECMAScript.

Pick-to: 6.7 6.5
Change-Id: I31bc7e6a87e404a8e6d314c99f163f82208e13a1
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QML: Deprecate coercion on type assertions</title>
<updated>2024-05-24T06:22:23+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2024-04-26T16:31:40+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=71e259837967f1eee50c057229094c2a971a1a61'/>
<id>71e259837967f1eee50c057229094c2a971a1a61</id>
<content type='text'>
By using an "as" cast you want to check the type of the value, not
coerce it. Previously, however, if you did this with a value type, it
would create the value type instead of just checking for it.

Add an attribute "Assertable" to the ValueTypeBehavior pragma that
prevents this and enables the correct behavior. Also print a warning
when coercing as part of an as-cast.

[ChangeLog][QtQml] A new attribute "Assertable" has been added to the
"ValueTypeBehavior" pragma. You should always use it if you want to
type-check value types using "as". If you don't use it, an instance of
the type is created as result of the "as" if the type doesn't match.

Task-number: QTBUG-124662
Change-Id: I1d5a6ca0a6f97d7d48440330bed1f9f6472198aa
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By using an "as" cast you want to check the type of the value, not
coerce it. Previously, however, if you did this with a value type, it
would create the value type instead of just checking for it.

Add an attribute "Assertable" to the ValueTypeBehavior pragma that
prevents this and enables the correct behavior. Also print a warning
when coercing as part of an as-cast.

[ChangeLog][QtQml] A new attribute "Assertable" has been added to the
"ValueTypeBehavior" pragma. You should always use it if you want to
type-check value types using "as". If you don't use it, an instance of
the type is created as result of the "as" if the type doesn't match.

Task-number: QTBUG-124662
Change-Id: I1d5a6ca0a6f97d7d48440330bed1f9f6472198aa
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add invokable default ctors to all named, structured value types</title>
<updated>2024-05-23T14:29:16+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2024-05-14T07:40:43+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=548f7ad9c2783cdda45b5f31eb517850c6419eea'/>
<id>548f7ad9c2783cdda45b5f31eb517850c6419eea</id>
<content type='text'>
This way you can create them using new and populate them manually
(provided you have a way of obtaining type references to them).

Task-number: QTBUG-124662
Change-Id: Icceacaefafc311044d519e4af011b078dbf2f1e7
Reviewed-by: Olivier De Cannière &lt;olivier.decanniere@qt.io&gt;
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This way you can create them using new and populate them manually
(provided you have a way of obtaining type references to them).

Task-number: QTBUG-124662
Change-Id: Icceacaefafc311044d519e4af011b078dbf2f1e7
Reviewed-by: Olivier De Cannière &lt;olivier.decanniere@qt.io&gt;
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QtQml: Let QQmlTypeWrapper act as a constructor for its type</title>
<updated>2024-05-23T11:28:15+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2024-04-26T11:59:43+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=f62adc926f34cb28831ead07d716fedd8d6d6c7b'/>
<id>f62adc926f34cb28831ead07d716fedd8d6d6c7b</id>
<content type='text'>
This calls any invokable ctors and only invokable ctors. Any
type that doesn't have an invokable ctor won't even expose a
function, since functions are determined by the presence of call
methods.

QMetaObjectWrapper gains the same functionality since the code is
shared. It can now not only create object types but also value types.

Task-number: QTBUG-124662
Change-Id: Ib30098666f67aef7a1f464f52d9b0bbd70d896d1
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This calls any invokable ctors and only invokable ctors. Any
type that doesn't have an invokable ctor won't even expose a
function, since functions are determined by the presence of call
methods.

QMetaObjectWrapper gains the same functionality since the code is
shared. It can now not only create object types but also value types.

Task-number: QTBUG-124662
Change-Id: Ib30098666f67aef7a1f464f52d9b0bbd70d896d1
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Doc: Mark Qt::createComponent module URI overload with a proper \since</title>
<updated>2024-05-22T16:02:37+00:00</updated>
<author>
<name>Ivan Tkachenko</name>
<email>me@ratijas.tk</email>
</author>
<published>2024-05-18T15:04:39+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=d074ceb9f66026675e5943d5fed250e2ec808496'/>
<id>d074ceb9f66026675e5943d5fed250e2ec808496</id>
<content type='text'>
Also, replace the import in the example to the minimal required one, so
it doesn't imply like if you need the whole QtQuick to create a
component from "QtQuick" URI. It could be confusing to the readers.

Amends 6656567a4085e3d6de01226fb7b1ec16ee7ba08c

Change-Id: Ibb79c83ea781e3820f505322266d38b325e4c8b2
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also, replace the import in the example to the minimal required one, so
it doesn't imply like if you need the whole QtQuick to create a
component from "QtQuick" URI. It could be confusing to the readers.

Amends 6656567a4085e3d6de01226fb7b1ec16ee7ba08c

Change-Id: Ibb79c83ea781e3820f505322266d38b325e4c8b2
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a wrapper builtin for QJsonArray</title>
<updated>2024-05-22T16:02:37+00:00</updated>
<author>
<name>Luca Di Sera</name>
<email>luca.disera@qt.io</email>
</author>
<published>2024-05-14T12:04:56+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=9c113e8ec6350d06ef265511b821a42f0d8eb77c'/>
<id>9c113e8ec6350d06ef265511b821a42f0d8eb77c</id>
<content type='text'>
Calling `qmllint` can produce warning for usages of the `QJsonArray`
type, due to it not being found.

Nonetheless, the engine special handles the type, so that `qmllint`
should not warn about it.

Make `QJsonArray` a builtin type so that calls to `qmllint` will import
and recognize the type.

Add a test-case to ensure that the type is now recognized.

Task-number: QTBUG-111015
Change-Id: I51744968a0316ccb016a4404326b74fa419037bd
Reviewed-by: Sami Shalayel &lt;sami.shalayel@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>
Calling `qmllint` can produce warning for usages of the `QJsonArray`
type, due to it not being found.

Nonetheless, the engine special handles the type, so that `qmllint`
should not warn about it.

Make `QJsonArray` a builtin type so that calls to `qmllint` will import
and recognize the type.

Add a test-case to ensure that the type is now recognized.

Task-number: QTBUG-111015
Change-Id: I51744968a0316ccb016a4404326b74fa419037bd
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Load a QJsonArray property as a Sequence</title>
<updated>2024-05-22T16:02:37+00:00</updated>
<author>
<name>Luca Di Sera</name>
<email>luca.disera@qt.io</email>
</author>
<published>2024-05-14T11:06:37+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=8dbcea319a20b0bc905d2988dc9f35394f73c2dc'/>
<id>8dbcea319a20b0bc905d2988dc9f35394f73c2dc</id>
<content type='text'>
When a property coming from C++ is used in a QML file, the engine might
perform some internal conversion to handle the type.

When a `QJsonArray` property is loaded, currently, it will be converted
to an internal `JsonObject` representation containing an engine-owned
array.

When the conversion is done, the data from the `QJsonArray` is copied as
a part of this process.

The performed copy is expected to act like a Javascript array.
Nonetheless, due to the way the conversion is implemented, using the
property will perform the requested work on the copy without writing
back to the original property.

This in turn prevents certain operation from working as expected, in
particular the mutable methods on the array prototype.

For example, if `jsonArray` is a `QJsonArray` property with a C++
provenance, the following will not register the push on the original
property, so that it will be lost the following time the property is
accessed:

```
...
jsonArray.push(4)
...
```

As a `QJsonArray` property should behave as a Javascript array when used
from QML, a `QJsonArray` property will now be converted to a `Sequence`,
an internal representation that behaves like a Javascript array but acts as a
reference object with property write-backs, to allow in-place mutations
to be correctly reflected on the original property.

Currently, a `QJsonArray` `Sequence` call to the sort method will not
correctly work due to the way the sort method is implemented.
This is currently left as non-working and will be fixed separately.

A non-exhaustive test-case was added to check that a C++ loaded
`QJsonProperty` acts as a Javascript array with regards to the Array
prototype methods, taking into consideration the inability of the sort
method to currently work.

Task-number: QTBUG-111015
Change-Id: Iec48fe4cba9adb9b794e5a568985b86b8da4556c
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a property coming from C++ is used in a QML file, the engine might
perform some internal conversion to handle the type.

When a `QJsonArray` property is loaded, currently, it will be converted
to an internal `JsonObject` representation containing an engine-owned
array.

When the conversion is done, the data from the `QJsonArray` is copied as
a part of this process.

The performed copy is expected to act like a Javascript array.
Nonetheless, due to the way the conversion is implemented, using the
property will perform the requested work on the copy without writing
back to the original property.

This in turn prevents certain operation from working as expected, in
particular the mutable methods on the array prototype.

For example, if `jsonArray` is a `QJsonArray` property with a C++
provenance, the following will not register the push on the original
property, so that it will be lost the following time the property is
accessed:

```
...
jsonArray.push(4)
...
```

As a `QJsonArray` property should behave as a Javascript array when used
from QML, a `QJsonArray` property will now be converted to a `Sequence`,
an internal representation that behaves like a Javascript array but acts as a
reference object with property write-backs, to allow in-place mutations
to be correctly reflected on the original property.

Currently, a `QJsonArray` `Sequence` call to the sort method will not
correctly work due to the way the sort method is implemented.
This is currently left as non-working and will be fixed separately.

A non-exhaustive test-case was added to check that a C++ loaded
`QJsonProperty` acts as a Javascript array with regards to the Array
prototype methods, taking into consideration the inability of the sort
method to currently work.

Task-number: QTBUG-111015
Change-Id: Iec48fe4cba9adb9b794e5a568985b86b8da4556c
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Android: Add qml-dom-binary value to android deploy settings</title>
<updated>2024-05-22T12:54:45+00:00</updated>
<author>
<name>Soheil Armin</name>
<email>soheil.armin@qt.io</email>
</author>
<published>2024-05-20T14:18:00+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=4f4160fb683c04ef134fd582db2a41881bb75031'/>
<id>4f4160fb683c04ef134fd582db2a41881bb75031</id>
<content type='text'>
androiddeployqt needs the path to qmldom tool to invoke it to
extract QML dom information. The output later will be used to
generate QQmlComponent subclasses that has component information
such as library name, module name, and QML qrc path.

ADQt will also use property &amp; method information extracted using
qmldom, to add typed property getters/setters, as well as typed
signal connection methods.

Task-number: QTBUG-124846
Change-Id: I7f3fb4e6afab92d114154139d34664f1629ecd29
Reviewed-by:  Alexey Edelev &lt;alexey.edelev@qt.io&gt;
Reviewed-by: Assam Boudjelthia &lt;assam.boudjelthia@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
androiddeployqt needs the path to qmldom tool to invoke it to
extract QML dom information. The output later will be used to
generate QQmlComponent subclasses that has component information
such as library name, module name, and QML qrc path.

ADQt will also use property &amp; method information extracted using
qmldom, to add typed property getters/setters, as well as typed
signal connection methods.

Task-number: QTBUG-124846
Change-Id: I7f3fb4e6afab92d114154139d34664f1629ecd29
Reviewed-by:  Alexey Edelev &lt;alexey.edelev@qt.io&gt;
Reviewed-by: Assam Boudjelthia &lt;assam.boudjelthia@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the registration of QByteArrayList in QML</title>
<updated>2024-05-17T19:09:58+00:00</updated>
<author>
<name>Alexey Edelev</name>
<email>alexey.edelev@qt.io</email>
</author>
<published>2024-05-17T15:35:19+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=c407036ab524b2c04f5e124500cd56dbcdaf0d22'/>
<id>c407036ab524b2c04f5e124500cd56dbcdaf0d22</id>
<content type='text'>
Add the wrapping struct that registeres the QML_FOREIGN QByteArrayList
container in QML.

The type could be useless in QML context, but Qt submodules generate
the scriptable properties of this type, so it's expected that the type
is registered by QML builtins.

Task-number: QTBUG-125240
Change-Id: I47bf224ba3b5bf23911c02c451f49f2a1148c75f
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the wrapping struct that registeres the QML_FOREIGN QByteArrayList
container in QML.

The type could be useless in QML context, but Qt submodules generate
the scriptable properties of this type, so it's expected that the type
is registered by QML builtins.

Task-number: QTBUG-125240
Change-Id: I47bf224ba3b5bf23911c02c451f49f2a1148c75f
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QJSPrimitiveValue: fix -Wswitch-enum</title>
<updated>2024-05-17T08:41:50+00:00</updated>
<author>
<name>Marc Mutz</name>
<email>marc.mutz@qt.io</email>
</author>
<published>2024-05-16T07:15:47+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=768a410e5c453c5a54ce4be590da056bc69d4d2a'/>
<id>768a410e5c453c5a54ce4be590da056bc69d4d2a</id>
<content type='text'>
-Wswitch-enum is a stricter version of -Wswitch, kicking in even in
the presence of a default: case label. We intend to add -Wswitch-enum
to headersclean, so fix the warnings here by listing all enumerators
explicitly.

Pick-to: 6.7
Change-Id: Ib015b27dc9186f49a941528425eb14e8f5bec987
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
-Wswitch-enum is a stricter version of -Wswitch, kicking in even in
the presence of a default: case label. We intend to add -Wswitch-enum
to headersclean, so fix the warnings here by listing all enumerators
explicitly.

Pick-to: 6.7
Change-Id: Ib015b27dc9186f49a941528425eb14e8f5bec987
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
