<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/qmldom/qqmldomreformatter.cpp, branch 6.6.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>qmlformat: Fix object declaration indentation in arrays</title>
<updated>2024-01-17T13:44:53+00:00</updated>
<author>
<name>Joshua Goins</name>
<email>joshua.goins@kdab.com</email>
</author>
<published>2023-09-13T20:32:46+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=dd6346e0f8ba8a1b6672ec3f398cbac013365857'/>
<id>dd6346e0f8ba8a1b6672ec3f398cbac013365857</id>
<content type='text'>
Object declarations inside of array patterns did not insert newlines
correctly. This fixes those while not touching other types of array
initializations (such as numeric literals) and the one of test data.

When extra commas are added to the end of arrays, they are now kept on the
correct line as well.

Pick-to: 6.5
Change-Id: I8fe67ef066b84f56237449c7695990daa915b4b6
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
(cherry picked from commit 295a1ce389cda8f360835c89d9a3b32cbcba7eb6)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
(cherry picked from commit 2b1bcfd3b6b2bdcd387e3dc645f35afa9672404b)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Object declarations inside of array patterns did not insert newlines
correctly. This fixes those while not touching other types of array
initializations (such as numeric literals) and the one of test data.

When extra commas are added to the end of arrays, they are now kept on the
correct line as well.

Pick-to: 6.5
Change-Id: I8fe67ef066b84f56237449c7695990daa915b4b6
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
(cherry picked from commit 295a1ce389cda8f360835c89d9a3b32cbcba7eb6)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
(cherry picked from commit 2b1bcfd3b6b2bdcd387e3dc645f35afa9672404b)
</pre>
</div>
</content>
</entry>
<entry>
<title>qmlformat: Fix property names with escape chars</title>
<updated>2024-01-16T09:14:35+00:00</updated>
<author>
<name>Semih Yavuz</name>
<email>semih.yavuz@qt.io</email>
</author>
<published>2023-12-12T11:33:24+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=d661e38affb7c59e1bd31e06de1f67ce5d1f82db'/>
<id>d661e38affb7c59e1bd31e06de1f67ce5d1f82db</id>
<content type='text'>
Formatter was breaking the string literal property names if they
consisted some escape sequences. Remove the complicated logic for
rewriting, instead  use the same literal that was scanned and assigned
to propertyName.

Pick-to: 6.5
Fixes: QTBUG-113776
Change-Id: I87d8c31d4893001e784536302e33f1f517f21acd
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
(cherry picked from commit 4c059a14b8ce91e005cb67d31cd94223274ad60d)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
(cherry picked from commit cf99be5aceb96b5c34604a1cbe924c42e9a0acf6)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Formatter was breaking the string literal property names if they
consisted some escape sequences. Remove the complicated logic for
rewriting, instead  use the same literal that was scanned and assigned
to propertyName.

Pick-to: 6.5
Fixes: QTBUG-113776
Change-Id: I87d8c31d4893001e784536302e33f1f517f21acd
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
(cherry picked from commit 4c059a14b8ce91e005cb67d31cd94223274ad60d)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
(cherry picked from commit cf99be5aceb96b5c34604a1cbe924c42e9a0acf6)
</pre>
</div>
</content>
</entry>
<entry>
<title>qmlformat: Don't indent call expression twice</title>
<updated>2023-12-14T04:48:19+00:00</updated>
<author>
<name>Joshua Goins</name>
<email>joshua.goins@kdab.com</email>
</author>
<published>2023-09-13T19:00:04+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=0d0bf0ce9a3530f46609c425b1b6a0ad2ae4296b'/>
<id>0d0bf0ce9a3530f46609c425b1b6a0ad2ae4296b</id>
<content type='text'>
This is common when passing properties to functions, which are inside of
a new block. The test data is changed to accommodate this new expected
behavior.

Pick-to: 6.5
Change-Id: I27e19468ff3af11ffcacf38cafec4754fb9ec5d7
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
(cherry picked from commit 278663393140673c193c2e75e4e2124f230ae35c)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
(cherry picked from commit 7e76592a6df1185c5f551c5582035889416126db)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is common when passing properties to functions, which are inside of
a new block. The test data is changed to accommodate this new expected
behavior.

Pick-to: 6.5
Change-Id: I27e19468ff3af11ffcacf38cafec4754fb9ec5d7
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
(cherry picked from commit 278663393140673c193c2e75e4e2124f230ae35c)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
(cherry picked from commit 7e76592a6df1185c5f551c5582035889416126db)
</pre>
</div>
</content>
</entry>
<entry>
<title>qmlformat: fix object destructuring, take 2</title>
<updated>2023-09-13T09:10:46+00:00</updated>
<author>
<name>Semih Yavuz</name>
<email>semih.yavuz@qt.io</email>
</author>
<published>2023-09-07T12:44:15+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=b7777f1129f124305be445c29ee087bf2ef8b609'/>
<id>b7777f1129f124305be445c29ee087bf2ef8b609</id>
<content type='text'>
The previous commit was omitting writing the binding targets. Fix it and
add more complicated object destructuring tests.

Amends 115916f217b0dc299b8df298f5c9c30369f561f8

Pick-to: 6.5
Change-Id: Iec994dace3b2c15e2c8826086466e66b70304e1a
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
(cherry picked from commit d7d1059ef96ff0410f5e3644f64059f16ea3b2b9)
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>
The previous commit was omitting writing the binding targets. Fix it and
add more complicated object destructuring tests.

Amends 115916f217b0dc299b8df298f5c9c30369f561f8

Pick-to: 6.5
Change-Id: Iec994dace3b2c15e2c8826086466e66b70304e1a
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
(cherry picked from commit d7d1059ef96ff0410f5e3644f64059f16ea3b2b9)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>FormalParameterList: prepare for qmlformat</title>
<updated>2023-09-11T23:36:12+00:00</updated>
<author>
<name>Sami Shalayel</name>
<email>sami.shalayel@qt.io</email>
</author>
<published>2023-09-06T15:07:21+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=03bd497190c331e27587beb2f324bf8673361aa8'/>
<id>03bd497190c331e27587beb2f324bf8673361aa8</id>
<content type='text'>
Remove useless arg#0 bindingIdentifier from FormalParameterList. They
are used nowhere, are not tested and are not even set correctly:
FormalParameterList::finish() sets next to nullptr before its forloop
that goes from this to this-&gt;next (that was freshly set to nullptr three
lines above)...

Instead of setting bindingIdentifier to arg#0 when its empty and testing
for arg#, just test for bindingIdentifier being empty. That saves some
trouble in qmlformat because you dont have to care about the position
that the current method parameter has.

Apropos position of the current parameter: qmlformat needs some context
when doing its reformatting test, to avoid reparsing code in completely
wrong contexts. Add missing preCode and postCode to MethodParameter to
provide an artificial context for qmlformat, so it knows that it is
working on a MethodParameter, and also teach qmlformat how to
get the FormalParameter out of the artificial context, by extracting it
from the FormalParameterList.

Pick-to: 6.5
Change-Id: I2bc82f65d95c3cd09ad846c60dd7561ac03efad3
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
Reviewed-by: Semih Yavuz &lt;semih.yavuz@qt.io&gt;
(cherry picked from commit 640ff3d8125264e25bd1826529b9a57cdddf2205)
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>
Remove useless arg#0 bindingIdentifier from FormalParameterList. They
are used nowhere, are not tested and are not even set correctly:
FormalParameterList::finish() sets next to nullptr before its forloop
that goes from this to this-&gt;next (that was freshly set to nullptr three
lines above)...

Instead of setting bindingIdentifier to arg#0 when its empty and testing
for arg#, just test for bindingIdentifier being empty. That saves some
trouble in qmlformat because you dont have to care about the position
that the current method parameter has.

Apropos position of the current parameter: qmlformat needs some context
when doing its reformatting test, to avoid reparsing code in completely
wrong contexts. Add missing preCode and postCode to MethodParameter to
provide an artificial context for qmlformat, so it knows that it is
working on a MethodParameter, and also teach qmlformat how to
get the FormalParameter out of the artificial context, by extracting it
from the FormalParameterList.

Pick-to: 6.5
Change-Id: I2bc82f65d95c3cd09ad846c60dd7561ac03efad3
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
Reviewed-by: Semih Yavuz &lt;semih.yavuz@qt.io&gt;
(cherry picked from commit 640ff3d8125264e25bd1826529b9a57cdddf2205)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qmlformat: fix formatting of object destructuring</title>
<updated>2023-08-01T14:41:40+00:00</updated>
<author>
<name>Semih Yavuz</name>
<email>semih.yavuz@qt.io</email>
</author>
<published>2023-07-31T13:12:01+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=aa603e15440903c5b215d07cdc2635386c3f0c1a'/>
<id>aa603e15440903c5b215d07cdc2635386c3f0c1a</id>
<content type='text'>
The following issues are fixed:
- [1]Incorrect detection of the property name as a string literal and
thus writing out them with quotation marks
- [2] Duplication of property name when a scoped variable is used as
property key
- [3] Writing out additional brackets during deconstruction
- [4] Incorrect formatting when a default is assigned to a lhs variable
like [a = 24, b] = array
- [5] Automatic addition of "" characters into the object keys
- [6] Automatic addition of assignment operator, instead only add it
when there is a pending initializer

Also, add the colon token location which was missing in the pattern
property rules. Remove it from a couple of rules that was giving
incorrect result. We require the location information of the colon token
to be correct when formatting.
A few of tst_qmlformat and tst_reformatter tests are adapted to the
above mentioned changes [1], [2], [5].

[ChangeLog][qmlformat][Important Behavior Changes] qmlformat will no
longer add "" characters automatically in the object keys unless the
object key is actually a string literal. Also, using a scoped variable
as the property key will no longer result in the duplication of the
property name.

Fixes: QTBUG-108275
Fixes: QTBUG-114839
Change-Id: I272d41d13df34ff5877f3efebe43c80255dd7c2b
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 115916f217b0dc299b8df298f5c9c30369f561f8)
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>
The following issues are fixed:
- [1]Incorrect detection of the property name as a string literal and
thus writing out them with quotation marks
- [2] Duplication of property name when a scoped variable is used as
property key
- [3] Writing out additional brackets during deconstruction
- [4] Incorrect formatting when a default is assigned to a lhs variable
like [a = 24, b] = array
- [5] Automatic addition of "" characters into the object keys
- [6] Automatic addition of assignment operator, instead only add it
when there is a pending initializer

Also, add the colon token location which was missing in the pattern
property rules. Remove it from a couple of rules that was giving
incorrect result. We require the location information of the colon token
to be correct when formatting.
A few of tst_qmlformat and tst_reformatter tests are adapted to the
above mentioned changes [1], [2], [5].

[ChangeLog][qmlformat][Important Behavior Changes] qmlformat will no
longer add "" characters automatically in the object keys unless the
object key is actually a string literal. Also, using a scoped variable
as the property key will no longer result in the duplication of the
property name.

Fixes: QTBUG-108275
Fixes: QTBUG-114839
Change-Id: I272d41d13df34ff5877f3efebe43c80255dd7c2b
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 115916f217b0dc299b8df298f5c9c30369f561f8)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Kill TypeArgument(List)</title>
<updated>2023-04-12T11:07:06+00:00</updated>
<author>
<name>Sami Shalayel</name>
<email>sami.shalayel@qt.io</email>
</author>
<published>2023-04-06T08:38:30+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=309545b6de220e590528c132c8d161c81e019edd'/>
<id>309545b6de220e590528c132c8d161c81e019edd</id>
<content type='text'>
Remove the forward declarations of TypeArgument(List) and its uses.
This amends e89a06753c772bd96b3299e03b2f7ad78ffc9fb9  that removed
TypeArgument(List)'s definition while leaving its forward declarations
and uses around.

Change-Id: I1a3e27ce18611beaf84b7c59e01a622f9e7f2477
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the forward declarations of TypeArgument(List) and its uses.
This amends e89a06753c772bd96b3299e03b2f7ad78ffc9fb9  that removed
TypeArgument(List)'s definition while leaving its forward declarations
and uses around.

Change-Id: I1a3e27ce18611beaf84b7c59e01a622f9e7f2477
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qmlformat: Fix handling of object destructuring in functions</title>
<updated>2023-03-02T19:31:13+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2023-03-02T12:46:54+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=310428e292243770fb3bd3b48e9f136b56d68b42'/>
<id>310428e292243770fb3bd3b48e9f136b56d68b42</id>
<content type='text'>
We weren't considering the bindingTarget of PatternElements, which broke
functions using object destructuring in the parameter list.

Fixes: QTBUG-111511
Pick-to: 6.5 6.5.0 6.2
Change-Id: Ie22fed2160538bf0c5733b5aced0fdac64621346
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We weren't considering the bindingTarget of PatternElements, which broke
functions using object destructuring in the parameter list.

Fixes: QTBUG-111511
Pick-to: 6.5 6.5.0 6.2
Change-Id: Ie22fed2160538bf0c5733b5aced0fdac64621346
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QML: Allow pragmas with multiple values</title>
<updated>2023-02-22T10:00:19+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2023-02-16T10:28:33+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=bdb2bb561054ad7e95ced2f4b79533d13000172b'/>
<id>bdb2bb561054ad7e95ced2f4b79533d13000172b</id>
<content type='text'>
This will be needed in follow-up changes.

Task-number: QTBUG-94807
Change-Id: I6243ea31290251c30dd0aceaae878568bc1c0525
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will be needed in follow-up changes.

Task-number: QTBUG-94807
Change-Id: I6243ea31290251c30dd0aceaae878568bc1c0525
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QML DOM: Remove support for Qt &lt; 6.5</title>
<updated>2023-01-30T14:58:11+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2023-01-26T14:16:25+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=9dae5399492104ac9733e0df1511b52f1e90582c'/>
<id>9dae5399492104ac9733e0df1511b52f1e90582c</id>
<content type='text'>
And build standalone DOM against Qt 6.5 (beta)

Change-Id: I9395b4932ecdedd28f10d1e791e2abe445516183
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And build standalone DOM against Qt 6.5 (beta)

Change-Id: I9395b4932ecdedd28f10d1e791e2abe445516183
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
