<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/tools/qmlformat/main.cpp, branch wip/qquickdeliveryagent</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: Use a struct to hold the command line options</title>
<updated>2021-02-10T13:29:29+00:00</updated>
<author>
<name>Furkan Uzumcu</name>
<email>furkanuzumcu@gmail.com</email>
</author>
<published>2021-02-07T22:07:04+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=1c35c8f71eb6863498548c6724f82be01d872b33'/>
<id>1c35c8f71eb6863498548c6724f82be01d872b33</id>
<content type='text'>
Keeping the parser and the code that uses the command line options in
the same function increases the number of lines for the same function,
making it harder to read, and the number of arguments for parseFile
function, makes it harder to understand and maintain.

This commit adds an `Options` struct to hold on to the command line
options and a build function to create the `Options` object.

Pick-to: 6.1
Change-Id: I5dec0a5a5e990f413ee65bf2eba2ea1087e0ea28
Reviewed-by: Maximilian Goldstein &lt;max.goldstein@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>
Keeping the parser and the code that uses the command line options in
the same function increases the number of lines for the same function,
making it harder to read, and the number of arguments for parseFile
function, makes it harder to understand and maintain.

This commit adds an `Options` struct to hold on to the command line
options and a build function to create the `Options` object.

Pick-to: 6.1
Change-Id: I5dec0a5a5e990f413ee65bf2eba2ea1087e0ea28
Reviewed-by: Maximilian Goldstein &lt;max.goldstein@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qmlformat: Remove import sorting</title>
<updated>2020-12-11T10:40:12+00:00</updated>
<author>
<name>Maximilian Goldstein</name>
<email>max.goldstein@qt.io</email>
</author>
<published>2020-12-10T14:58:36+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=cf3e0559b01b249a6ec06f8826e8e05aca1301ec'/>
<id>cf3e0559b01b249a6ec06f8826e8e05aca1301ec</id>
<content type='text'>
Remove import sorting due to the fact that sorting imports can break code.

[ChangeLog][QML Tooling][qmlformat] Remove import sorting and the (now obsolete) -n parameter to disable it

Fixes: QTBUG-89295
Pick-to: 6.0
Change-Id: I5ff13d0ae3c715db7645b412152aadb31811ce5a
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove import sorting due to the fact that sorting imports can break code.

[ChangeLog][QML Tooling][qmlformat] Remove import sorting and the (now obsolete) -n parameter to disable it

Fixes: QTBUG-89295
Pick-to: 6.0
Change-Id: I5ff13d0ae3c715db7645b412152aadb31811ce5a
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qmlformat: Add indent options</title>
<updated>2020-11-24T14:05:13+00:00</updated>
<author>
<name>Maximilian Goldstein</name>
<email>max.goldstein@qt.io</email>
</author>
<published>2020-09-02T10:34:29+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=db0b7cfcb2923aa4f80ed4d2c2e4d2052d52f96a'/>
<id>db0b7cfcb2923aa4f80ed4d2c2e4d2052d52f96a</id>
<content type='text'>
Adds the ability to use tabs or any amount of spaces for indentation
instead of the default of 4 spaces.

[ChangeLog][QML][qmlformat] Added option to customize
indentation.

Fixes: QTBUG-86413
Change-Id: I3c370dda2d0069ef61202a2d862ce15bc513e55e
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds the ability to use tabs or any amount of spaces for indentation
instead of the default of 4 spaces.

[ChangeLog][QML][qmlformat] Added option to customize
indentation.

Fixes: QTBUG-86413
Change-Id: I3c370dda2d0069ef61202a2d862ce15bc513e55e
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qmlformat: Add files option</title>
<updated>2020-06-25T07:02:11+00:00</updated>
<author>
<name>Maximilian Goldstein</name>
<email>max.goldstein@qt.io</email>
</author>
<published>2020-06-18T08:25:30+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=d48b87450327e710f7b0a843627624aa67cae116'/>
<id>d48b87450327e710f7b0a843627624aa67cae116</id>
<content type='text'>
Adds a flag for formatting files listed in a file

Fixes: QTBUG-85078
Change-Id: I235db3ad52291d2c211b092b8505340728be3949
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds a flag for formatting files listed in a file

Fixes: QTBUG-85078
Change-Id: I235db3ad52291d2c211b092b8505340728be3949
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qmlformat: Copy string literals verbatim</title>
<updated>2020-06-17T11:04:42+00:00</updated>
<author>
<name>Maximilian Goldstein</name>
<email>max.goldstein@qt.io</email>
</author>
<published>2020-06-12T11:52:38+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=237a0e86c700116bfa55a1e1ee6fdabcc1ca5c9c'/>
<id>237a0e86c700116bfa55a1e1ee6fdabcc1ca5c9c</id>
<content type='text'>
Copy string literals verbatim instead of reformatting them.

Fixes: QTBUG-84599
Change-Id: I36307eb30faa586f50cf0ce2660fb4e2686a3e4a
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Copy string literals verbatim instead of reformatting them.

Fixes: QTBUG-84599
Change-Id: I36307eb30faa586f50cf0ce2660fb4e2686a3e4a
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qmlformat: Add option for alternative line endings</title>
<updated>2020-03-25T05:15:13+00:00</updated>
<author>
<name>Maximilian Goldstein</name>
<email>max.goldstein@qt.io</email>
</author>
<published>2020-03-18T08:19:31+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=4faf242d1a18e206ddd9c567649a9dddbf6217df'/>
<id>4faf242d1a18e206ddd9c567649a9dddbf6217df</id>
<content type='text'>
Allows user to decide between native (default), macos (\r), unix (\n) or windows (\r\n)
line endings.

Fixes: QTBUG-82258
Change-Id: Ie1eb365085815cbbebbf0d026c6f72f0ef2acb9d
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allows user to decide between native (default), macos (\r), unix (\n) or windows (\r\n)
line endings.

Fixes: QTBUG-82258
Change-Id: Ie1eb365085815cbbebbf0d026c6f72f0ef2acb9d
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Restore offset/length in QQmlJS::DiagnosticMessage</title>
<updated>2020-03-02T09:35:50+00:00</updated>
<author>
<name>Simon Hausmann</name>
<email>simon.hausmann@qt.io</email>
</author>
<published>2020-02-27T09:49:14+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=8ab237edf170f5b0482dccf5169868e5c7c47771'/>
<id>8ab237edf170f5b0482dccf5169868e5c7c47771</id>
<content type='text'>
This is needed in a few places outside of declarative, so this change
restores the loc member in DiagnosticMessage and moves
QQmlJS::AST::SourceLocation into common's QQmlJS namespace/directory.
QQmlError is unaffected and retains only line/column.

Amends d4d197d06279f9257647628f7e1ccc9ec763a6bb

Change-Id: Ifb9d344228e3c6e9e26fc4fe112686f9336ea2b2
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is needed in a few places outside of declarative, so this change
restores the loc member in DiagnosticMessage and moves
QQmlJS::AST::SourceLocation into common's QQmlJS namespace/directory.
QQmlError is unaffected and retains only line/column.

Amends d4d197d06279f9257647628f7e1ccc9ec763a6bb

Change-Id: Ifb9d344228e3c6e9e26fc4fe112686f9336ea2b2
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qmlformat: Support even more language features</title>
<updated>2020-01-30T07:24:40+00:00</updated>
<author>
<name>Maximilian Goldstein</name>
<email>max.goldstein@qt.io</email>
</author>
<published>2020-01-17T13:28:09+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=e080f48f905be597b1a645f1641b2b06553df6a2'/>
<id>e080f48f905be597b1a645f1641b2b06553df6a2</id>
<content type='text'>
Adds support (among other things) for:
- Pragmas
- Type annotations
- get / set properties
- Some previously unsupported escape sequences (\b,\v...)
- Calling methods on numeric literals

Also now checks whether the dumped code is still parsable.

Change-Id: Ia142a7c0b3e608115e79c1d98a62b682dce4eec9
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds support (among other things) for:
- Pragmas
- Type annotations
- get / set properties
- Some previously unsupported escape sequences (\b,\v...)
- Calling methods on numeric literals

Also now checks whether the dumped code is still parsable.

Change-Id: Ia142a7c0b3e608115e79c1d98a62b682dce4eec9
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qmlformat: Fix some language features being unsupported</title>
<updated>2020-01-17T09:02:29+00:00</updated>
<author>
<name>Maximilian Goldstein</name>
<email>max.goldstein@qt.io</email>
</author>
<published>2020-01-15T10:25:18+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=9e674be4fb8c369873a009f58e3152a12d2c4cce'/>
<id>9e674be4fb8c369873a009f58e3152a12d2c4cce</id>
<content type='text'>
qmlformat now supports:
- arrow functions
- generator functions
- this expressions
- object patterns
- regex literals
- type expressions
- plain expressions

Aborts if an error occurs during dumping now.

Also now automatically tests qmlformat against all example / test qml
files.

Change-Id: Idc24004c6f2c1cd65289bcad75985a1ef047c8d2
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
qmlformat now supports:
- arrow functions
- generator functions
- this expressions
- object patterns
- regex literals
- type expressions
- plain expressions

Aborts if an error occurs during dumping now.

Also now automatically tests qmlformat against all example / test qml
files.

Change-Id: Idc24004c6f2c1cd65289bcad75985a1ef047c8d2
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qtdeclarative/tools: Implement qmlformat</title>
<updated>2019-12-19T15:45:51+00:00</updated>
<author>
<name>Maximilian Goldstein</name>
<email>max.goldstein@qt.io</email>
</author>
<published>2019-12-13T15:10:46+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=73189151b59430671630ae931ac42c0e18cdab55'/>
<id>73189151b59430671630ae931ac42c0e18cdab55</id>
<content type='text'>
qmlformat is a tool that formats qml files according to the QML coding
conventions (https://doc.qt.io/qt-5/qml-codingconventions.html).

Change-Id: I359c4bd3b51f60614535f0e857d7e0b21b1d9033
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
qmlformat is a tool that formats qml files according to the QML coding
conventions (https://doc.qt.io/qt-5/qml-codingconventions.html).

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