<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/qmlcompiler/qqmljscompiler.cpp, branch 6.5.5</title>
<subtitle>Qt Declarative (Quick 2)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/'/>
<entry>
<title>Revert "Update commercial SPDX-License-Identifier"</title>
<updated>2025-06-09T09:05:15+00:00</updated>
<author>
<name>Tarja Sundqvist</name>
<email>tarja.sundqvist@qt.io</email>
</author>
<published>2025-05-30T09:58:32+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=1bdc78e942ff99f8cc8171a6d21237740a2ad9df'/>
<id>1bdc78e942ff99f8cc8171a6d21237740a2ad9df</id>
<content type='text'>
This reverts commit 6517e8df24d2381e951b9ec3e0cda2ae33edac37.

Commercial SPDX license identifiers need to be removed from
the opensource release.

Change-Id: I60f8c76ace400db6182e012c8aae050d13d262e9
Reviewed-by: Jani Heikkinen &lt;jani.heikkinen@qt.io&gt;
(cherry picked from commit ab97288de27970ba3cb0300158df757c01dabd77)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 6517e8df24d2381e951b9ec3e0cda2ae33edac37.

Commercial SPDX license identifiers need to be removed from
the opensource release.

Change-Id: I60f8c76ace400db6182e012c8aae050d13d262e9
Reviewed-by: Jani Heikkinen &lt;jani.heikkinen@qt.io&gt;
(cherry picked from commit ab97288de27970ba3cb0300158df757c01dabd77)
</pre>
</div>
</content>
</entry>
<entry>
<title>Update commercial SPDX-License-Identifier</title>
<updated>2023-12-13T16:58:36+00:00</updated>
<author>
<name>Tarja Sundqvist</name>
<email>tarja.sundqvist@qt.io</email>
</author>
<published>2023-12-08T15:16:30+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=6517e8df24d2381e951b9ec3e0cda2ae33edac37'/>
<id>6517e8df24d2381e951b9ec3e0cda2ae33edac37</id>
<content type='text'>
Some files in tqtc-qtdeclarative were missing the commercial
SPDX-License-Identifier. Build files, examples, tests, or
documentation are not updated.

Task-number: QTQAINFRA-5900
Change-Id: I2cad9a7a271b0b3f3af3074259614b890b266a91
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
(cherry picked from commit 132fe2df41fc5e69fec39440b35137d5f0d63f6e)
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>
Some files in tqtc-qtdeclarative were missing the commercial
SPDX-License-Identifier. Build files, examples, tests, or
documentation are not updated.

Task-number: QTQAINFRA-5900
Change-Id: I2cad9a7a271b0b3f3af3074259614b890b266a91
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
(cherry picked from commit 132fe2df41fc5e69fec39440b35137d5f0d63f6e)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QmlCompiler: Do not generate code that shadows arguments</title>
<updated>2023-07-06T19:28:20+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2023-07-05T11:37:23+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=bca9e06ac3eeb9659a3d181443e7d268459885f5'/>
<id>bca9e06ac3eeb9659a3d181443e7d268459885f5</id>
<content type='text'>
Fixes: QTBUG-114897
Change-Id: I23bc913a86ee90764735c1661cd5036f7d177a22
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit b7b63ba92c38a66bedb6f0c009bfbf5801f7b701)
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>
Fixes: QTBUG-114897
Change-Id: I23bc913a86ee90764735c1661cd5036f7d177a22
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit b7b63ba92c38a66bedb6f0c009bfbf5801f7b701)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QmlCompiler: Drop broken line comments in generated C++</title>
<updated>2023-02-23T13:46:37+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2023-02-22T10:06:54+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=1031750655cc9970534dd8661eb2a04939dd35a1'/>
<id>1031750655cc9970534dd8661eb2a04939dd35a1</id>
<content type='text'>
They didn't work because the ordering of instructions is not the same as
the ordering of lines. They also weren't very helpful because a single
line may result in multiple instructions and vice versa. On top of
everything, they also introduced UB via the std::upper_bound call.

Rather, just print the name of the function and the place in the file at
the beginning of each C++ function. That is much more helpful since we
can then just correlate it to the original QML code. For
instruction-by-instruction mapping we have to consult the byte code
trace anyway.

Fixes: QTBUG-111340
Change-Id: I599ce384cfaf88a7347583a55976a3b98080435d
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit ab9f4d2e2614d693c254a027a28824e83c7760f0)
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>
They didn't work because the ordering of instructions is not the same as
the ordering of lines. They also weren't very helpful because a single
line may result in multiple instructions and vice versa. On top of
everything, they also introduced UB via the std::upper_bound call.

Rather, just print the name of the function and the place in the file at
the beginning of each C++ function. That is much more helpful since we
can then just correlate it to the original QML code. For
instruction-by-instruction mapping we have to consult the byte code
trace anyway.

Fixes: QTBUG-111340
Change-Id: I599ce384cfaf88a7347583a55976a3b98080435d
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit ab9f4d2e2614d693c254a027a28824e83c7760f0)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tooling: silence -Wmissing-variable-declarations</title>
<updated>2022-11-16T04:57:58+00:00</updated>
<author>
<name>Tim Blechmann</name>
<email>tim@klingt.org</email>
</author>
<published>2022-10-06T11:24:47+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=6b03bc92739d7ae5f38093162ec9d2ca25ff8906'/>
<id>6b03bc92739d7ae5f38093162ec9d2ca25ff8906</id>
<content type='text'>
silence clang's -Wmissing-variable-declarations

Pick-to: 6.4
Change-Id: I40189c219bfeaeba103a56a08e489b019e2905bd
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>
silence clang's -Wmissing-variable-declarations

Pick-to: 6.4
Change-Id: I40189c219bfeaeba103a56a08e489b019e2905bd
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>
<entry>
<title>tooling: silence -Wextra-semi-stmt</title>
<updated>2022-11-16T04:57:58+00:00</updated>
<author>
<name>Tim Blechmann</name>
<email>tim@klingt.org</email>
</author>
<published>2022-10-05T11:37:07+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=aadf0243c693d6bfd9009278b883e1d5b1015097'/>
<id>aadf0243c693d6bfd9009278b883e1d5b1015097</id>
<content type='text'>
silence clang's -Wextra-semi-stmt

Pick-to: 6.4
Change-Id: I5dee9ec46b44076f0fc0590399131b1b267e1ad2
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
silence clang's -Wextra-semi-stmt

Pick-to: 6.4
Change-Id: I5dee9ec46b44076f0fc0590399131b1b267e1ad2
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QmlCompiler: Allow lists as arguments to methods</title>
<updated>2022-11-10T14:00:11+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2022-10-19T12:35:24+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=91c6d455595d245445f28d6d1c27c4f2710ef3c3'/>
<id>91c6d455595d245445f28d6d1c27c4f2710ef3c3</id>
<content type='text'>
Since lists are allowed as property types, you should be able to pass
them as arguments to methods, too. For now we only handle QML-defined
methods, implemented by adding JavaScript functions to your QML
elements. The usual type coercion rules apply if you pass JavaScript
arrays to such methods. That is, it usually works.

We now resolve properties with the "list" flag to their actual types
(QQmlListProperty or QList) already when populating the QQmlJSScope, and
store the list types as members of QQmlJSScope rather than as a special
map in QQmlJSTypeResolver. This allows us to do the same to lists passed
as arguments and simplifies some of the type analysis.

Fixes: QTBUG-107171
Change-Id: Idf71ccdc1d59f472c17084a36b5d7879c4d959c0
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since lists are allowed as property types, you should be able to pass
them as arguments to methods, too. For now we only handle QML-defined
methods, implemented by adding JavaScript functions to your QML
elements. The usual type coercion rules apply if you pass JavaScript
arrays to such methods. That is, it usually works.

We now resolve properties with the "list" flag to their actual types
(QQmlListProperty or QList) already when populating the QQmlJSScope, and
store the list types as members of QQmlJSScope rather than as a special
map in QQmlJSTypeResolver. This allows us to do the same to lists passed
as arguments and simplifies some of the type analysis.

Fixes: QTBUG-107171
Change-Id: Idf71ccdc1d59f472c17084a36b5d7879c4d959c0
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QmlCompiler: Add a separate flag for the "pragma Strict" check</title>
<updated>2022-10-20T19:37:57+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2022-10-13T07:19:56+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=bc528a0770150e3fde1fdab7b699379bc736b9e1'/>
<id>bc528a0770150e3fde1fdab7b699379bc736b9e1</id>
<content type='text'>
We want to trigger the qFatal() when running qmlcachegen or qmlsc, but
we don't want to trigger it in qmllint, even if we are using the same
QtMsgType for the severity of the messages.

In turn, demote qmlCompiler messages to QtWarningMsg in qmlcachegen.

Pick-to: 6.4
Task-number: QTBUG-107168
Change-Id: Ib660df41742b2d426241eb29ac4c91f4933c5ba1
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We want to trigger the qFatal() when running qmlcachegen or qmlsc, but
we don't want to trigger it in qmllint, even if we are using the same
QtMsgType for the severity of the messages.

In turn, demote qmlCompiler messages to QtWarningMsg in qmlcachegen.

Pick-to: 6.4
Task-number: QTBUG-107168
Change-Id: Ib660df41742b2d426241eb29ac4c91f4933c5ba1
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Port from qAsConst() to std::as_const()</title>
<updated>2022-10-07T21:38:56+00:00</updated>
<author>
<name>Marc Mutz</name>
<email>marc.mutz@qt.io</email>
</author>
<published>2022-10-06T09:30:50+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=c2d490a2385ea6f389340a296acaac0fa198c8b9'/>
<id>c2d490a2385ea6f389340a296acaac0fa198c8b9</id>
<content type='text'>
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I601bf70f020f511019ed28731ba53b14b765dbf0
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I601bf70f020f511019ed28731ba53b14b765dbf0
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Port from container::count() and length() to size()</title>
<updated>2022-10-07T21:38:48+00:00</updated>
<author>
<name>Marc Mutz</name>
<email>marc.mutz@qt.io</email>
</author>
<published>2022-10-05T05:29:16+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=958cd3ee1094a068b6d0ff27c73a4b3caff088ad'/>
<id>958cd3ee1094a068b6d0ff27c73a4b3caff088ad</id>
<content type='text'>
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:

  auto QtContainerClass = anyOf(
      expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o),
      expr(hasType(namedDecl(hasAnyName(&lt;classes&gt;)))).bind(o));
  makeRule(cxxMemberCallExpr(on(QtContainerClass),
                             callee(cxxMethodDecl(hasAnyName({"count", "length"),
                                                  parameterCountIs(0))))),
           changeTo(cat(access(o, cat("size"), "()"))),
           cat("use 'size()' instead of 'count()/length()'"))

a.k.a qt-port-to-std-compatible-api with config Scope: 'Container',
with the extended set of container classes recognized.

Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7
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 a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:

  auto QtContainerClass = anyOf(
      expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o),
      expr(hasType(namedDecl(hasAnyName(&lt;classes&gt;)))).bind(o));
  makeRule(cxxMemberCallExpr(on(QtContainerClass),
                             callee(cxxMethodDecl(hasAnyName({"count", "length"),
                                                  parameterCountIs(0))))),
           changeTo(cat(access(o, cat("size"), "()"))),
           cat("use 'size()' instead of 'count()/length()'"))

a.k.a qt-port-to-std-compatible-api with config Scope: 'Container',
with the extended set of container classes recognized.

Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
