<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/tests/auto/qmldom/domitem/tst_qmldomitem.h, branch dev</title>
<subtitle>Qt Declarative (Quick 2)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/'/>
<entry>
<title>Tests: Remove unused includes from dom/format tests</title>
<updated>2026-10-02T11:22:46+00:00</updated>
<author>
<name>Olivier De Cannière</name>
<email>olivier.decanniere@qt.io</email>
</author>
<published>2026-10-01T09:08:12+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=bac9da45c9ec7927bde3b0a2b4dc7ed1fc3f032e'/>
<id>bac9da45c9ec7927bde3b0a2b4dc7ed1fc3f032e</id>
<content type='text'>
Task-number: QTBUG-151040
Change-Id: I899b2c662e4de5bfe3f4db5af608dfb4a4ddcc93
Reviewed-by: Semih Yavuz &lt;semih.yavuz@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Task-number: QTBUG-151040
Change-Id: I899b2c662e4de5bfe3f4db5af608dfb4a4ddcc93
Reviewed-by: Semih Yavuz &lt;semih.yavuz@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>DomEnvironment: don't let users modify SemanticAnalysis</title>
<updated>2026-08-24T10:07:03+00:00</updated>
<author>
<name>Sami Shalayel</name>
<email>sami.shalayel@qt.io</email>
</author>
<published>2026-08-14T08:46:43+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=101cb19916d1ff3205260a878af7977ea3533e65'/>
<id>101cb19916d1ff3205260a878af7977ea3533e65</id>
<content type='text'>
Don't let users of DomEnvironment call updateLoadpaths() and
setResourcepaths(): instead, set import and resource paths before
loading a file to avoid setting them during the loading of a file.

Modifying the import and resource paths on the QQmlJSImporter while it
is being used to load a file leads to the crash "A" as seen in
QTBUG-149089, where a thread using QQmlJSImporter does setImportPaths(),
clearing internal caches in QQmlJSImporter while a second thread, using
the same QQmlJSImporter, is actually loading a QML module into the same
cache. Moving the updateLoadpaths() and setResourcepaths() calls outside
of the file loading mechanism avoids this situation altogether, without
having to add mutexes to QQmlJSImporter.

The same cause very probably also causes crash "B".

Pick-to: 6.12 6.11 6.8
Fixes: QTBUG-149089
Change-Id: I1aa89419d8b78c4cee08ffd7b10116125135f5f1
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't let users of DomEnvironment call updateLoadpaths() and
setResourcepaths(): instead, set import and resource paths before
loading a file to avoid setting them during the loading of a file.

Modifying the import and resource paths on the QQmlJSImporter while it
is being used to load a file leads to the crash "A" as seen in
QTBUG-149089, where a thread using QQmlJSImporter does setImportPaths(),
clearing internal caches in QQmlJSImporter while a second thread, using
the same QQmlJSImporter, is actually loading a QML module into the same
cache. Moving the updateLoadpaths() and setResourcepaths() calls outside
of the file loading mechanism avoids this situation altogether, without
having to add mutexes to QQmlJSImporter.

The same cause very probably also causes crash "B".

Pick-to: 6.12 6.11 6.8
Fixes: QTBUG-149089
Change-Id: I1aa89419d8b78c4cee08ffd7b10116125135f5f1
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qmldom: fix crash on property definition blocks</title>
<updated>2026-08-24T10:07:03+00:00</updated>
<author>
<name>Semih Yavuz</name>
<email>semih.yavuz@qt.io</email>
</author>
<published>2026-08-18T11:01:29+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=46cd7ea557ff0110679aaa4ba618047114a94bfe'/>
<id>46cd7ea557ff0110679aaa4ba618047114a94bfe</id>
<content type='text'>
m_nestedFunctionDepth is a parameter that tracks whether
FunctionDeclaration is a qml object member or a plain JS local function.
While QQmlDomAstCreatorBase::visit(UiScriptBinding)
increments it, visit(UiPublicMember) never did the same. This caused the
code like property var c: { function test() {} } misidentify the inner
test as a top-level qmlmethod pushing the MethodInfo node onto the node
stack that nothing ever popped, which eventually crashes due to stack
imbalance.

Increment/decrement m_nestedFunctionDepth around UiPublicMember's
statement the same way it's already done for UiScriptBinding.

Pick-to: 6.12 6.11 6.8
Fixes: QTBUG-149244
Change-Id: Ia2e7ee82bc0170770abbfd786d88c039a3a7fa21
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>
m_nestedFunctionDepth is a parameter that tracks whether
FunctionDeclaration is a qml object member or a plain JS local function.
While QQmlDomAstCreatorBase::visit(UiScriptBinding)
increments it, visit(UiPublicMember) never did the same. This caused the
code like property var c: { function test() {} } misidentify the inner
test as a top-level qmlmethod pushing the MethodInfo node onto the node
stack that nothing ever popped, which eventually crashes due to stack
imbalance.

Increment/decrement m_nestedFunctionDepth around UiPublicMember's
statement the same way it's already done for UiScriptBinding.

Pick-to: 6.12 6.11 6.8
Fixes: QTBUG-149244
Change-Id: Ia2e7ee82bc0170770abbfd786d88c039a3a7fa21
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>Fix developer build with -Wunused-variable and Q_WARN_UNUSED_VARIABLE</title>
<updated>2026-07-23T16:27:13+00:00</updated>
<author>
<name>Sergio Martins</name>
<email>sergio.martins@kdab.com</email>
</author>
<published>2026-07-12T20:17:33+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=dab917b946e10184b1bffa5b94a4f0faf78b7aec'/>
<id>dab917b946e10184b1bffa5b94a4f0faf78b7aec</id>
<content type='text'>
Removes unused container leftovers.

In tst_qmldomitem.h just commented-out l4 since it's used in other
commented-out code.

Task-number: QTBUG-148221
Change-Id: I849c72729a918ebe05208e67fe2fe55bb2de08db
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removes unused container leftovers.

In tst_qmldomitem.h just commented-out l4 since it's used in other
commented-out code.

Task-number: QTBUG-148221
Change-Id: I849c72729a918ebe05208e67fe2fe55bb2de08db
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qmlformat/qmlls/dom: mark invalid files in addError</title>
<updated>2026-03-26T16:06:03+00:00</updated>
<author>
<name>Sami Shalayel</name>
<email>sami.shalayel@qt.io</email>
</author>
<published>2025-12-11T14:51:28+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=5a6557620f097fc0cd7af0209aa087d3db0811b1'/>
<id>5a6557620f097fc0cd7af0209aa087d3db0811b1</id>
<content type='text'>
Make addError() set the isValid flag to false. This makes qmlformat reject
invalid files, instead of trying to format them, for example.

Adapt a test that was triggering addError() but that didn't expect the
new file to be error-free. It seems that the copied DomItem references
the environment that does not exist in the universe, so don't try to
copy the file via the universe. This also silences some QCRITICAL
messages during the test.

Pick-to: 6.11
Task-number: QTBUG-142711
Change-Id: I89a29733b5b18cb1a70c35feb4a9fed3ae35c8a2
Reviewed-by: Semih Yavuz &lt;semih.yavuz@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make addError() set the isValid flag to false. This makes qmlformat reject
invalid files, instead of trying to format them, for example.

Adapt a test that was triggering addError() but that didn't expect the
new file to be error-free. It seems that the copied DomItem references
the environment that does not exist in the universe, so don't try to
copy the file via the universe. This also silences some QCRITICAL
messages during the test.

Pick-to: 6.11
Task-number: QTBUG-142711
Change-Id: I89a29733b5b18cb1a70c35feb4a9fed3ae35c8a2
Reviewed-by: Semih Yavuz &lt;semih.yavuz@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qqmldomastcreator: remove Q_UNREACHABLE that gets hit</title>
<updated>2025-12-18T16:29:47+00:00</updated>
<author>
<name>Sami Shalayel</name>
<email>sami.shalayel@qt.io</email>
</author>
<published>2025-12-11T14:55:26+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=0953b874419781466f7393845c7f00bccfd40d65'/>
<id>0953b874419781466f7393845c7f00bccfd40d65</id>
<content type='text'>
It seems that Q_UNREACHABLE triggers UB at runtime when hit in a release
build, so remove it and log an error instead. Ignore the invalid part.

Pick-to: 6.11 6.10 6.8
Fixes: QTBUG-142711
Change-Id: I445e46a6964f072a939cd6666c15c8d1ff5a0966
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It seems that Q_UNREACHABLE triggers UB at runtime when hit in a release
build, so remove it and log an error instead. Ignore the invalid part.

Pick-to: 6.11 6.10 6.8
Fixes: QTBUG-142711
Change-Id: I445e46a6964f072a939cd6666c15c8d1ff5a0966
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qmlls: use resource files from CMake for the DOM</title>
<updated>2025-12-05T18:36:08+00:00</updated>
<author>
<name>Sami Shalayel</name>
<email>sami.shalayel@qt.io</email>
</author>
<published>2025-12-02T15:23:30+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=7704edb6d9632726b2d7381f4848cb7c1e852503'/>
<id>7704edb6d9632726b2d7381f4848cb7c1e852503</id>
<content type='text'>
We can use the resource files from the .qmlls.build.ini also when
constructing the DOM, instead of iterating over the build and import
folders.

Fix and rename a test in tst_qmldomitem.

Task-number: QTBUG-141707
Change-Id: I9dcbd4cd307aba251e5de1d8c00c97b22dd87eb4
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can use the resource files from the .qmlls.build.ini also when
constructing the DOM, instead of iterating over the build and import
folders.

Fix and rename a test in tst_qmldomitem.

Task-number: QTBUG-141707
Change-Id: I9dcbd4cd307aba251e5de1d8c00c97b22dd87eb4
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>DOM: remove wrapField</title>
<updated>2025-11-28T14:41:50+00:00</updated>
<author>
<name>Sami Shalayel</name>
<email>sami.shalayel@qt.io</email>
</author>
<published>2025-11-25T10:39:36+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=23ef411c6aa9b1f2a1140fc560e13ec471958b9a'/>
<id>23ef411c6aa9b1f2a1140fc560e13ec471958b9a</id>
<content type='text'>
It only calls wrap(). Replace all usages, and change the first
argument to use PathEls::Field(). This helps unclutter the DomItem
interface.

Task-number: QTBUG-142187
Change-Id: I3aeda82b95948dde7bb7b07ab573585ac11958a6
Reviewed-by: Semih Yavuz &lt;semih.yavuz@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It only calls wrap(). Replace all usages, and change the first
argument to use PathEls::Field(). This helps unclutter the DomItem
interface.

Task-number: QTBUG-142187
Change-Id: I3aeda82b95948dde7bb7b07ab573585ac11958a6
Reviewed-by: Semih Yavuz &lt;semih.yavuz@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Dom: also lazy-load files that don't exist on disk</title>
<updated>2025-10-21T14:53:03+00:00</updated>
<author>
<name>Sami Shalayel</name>
<email>sami.shalayel@qt.io</email>
</author>
<published>2025-09-12T14:32:27+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=3d754edf849e0f2f8d0cfb6838985b1f7267a1ba'/>
<id>3d754edf849e0f2f8d0cfb6838985b1f7267a1ba</id>
<content type='text'>
Fix FileToLoad::fromMemory to not set an empty file path on non-existent
files. Otherwise, the lazy-loading machanism will see that the factory
has an empty path and will think that the factory is invalid and won't
populate the file.

Add a test that files with nonexistent file paths get populated. This
case might happen while writing tests with snippets, where no on-disk
file exists.

Change-Id: I48ffd5f47a5f5f5111cfd257059093ce13ed5293
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix FileToLoad::fromMemory to not set an empty file path on non-existent
files. Otherwise, the lazy-loading machanism will see that the factory
has an empty path and will think that the factory is invalid and won't
populate the file.

Add a test that files with nonexistent file paths get populated. This
case might happen while writing tests with snippets, where no on-disk
file exists.

Change-Id: I48ffd5f47a5f5f5111cfd257059093ce13ed5293
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQmlDomAstCreator: enable scriptexpressions for DomCreationOption::Default</title>
<updated>2025-10-01T07:00:14+00:00</updated>
<author>
<name>Sami Shalayel</name>
<email>sami.shalayel@qt.io</email>
</author>
<published>2025-09-12T12:10:09+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=2c81a99a87feee38f76aff4dfd2bc0127d0a49da'/>
<id>2c81a99a87feee38f76aff4dfd2bc0127d0a49da</id>
<content type='text'>
This commit enables scriptexpressions for DomCreationOptions::Default.

QQmlDomAstCreator does not know how to handle certain script
expressions, notably JS lists due to the weird way
PatternElementList::accept0() is implemented.

QQmlDomAstCreatorWithQQmlJSScope uses custom list iteration for types
like PatternElementList to make QQmlDomAstCreator support them
correctly.

Move the custom list iteration functionality out of
QQmlDomAstCreatorWithQQmlJSScope so that QQmlDomAstCreator can also
benefit from it.

Rename QQmlDomAstCreator to QQmlDomAstCreatorBase. The Base version does
not do any custom iteration and can be used by
QQmlDomAstCreatorWithQQmlJSScope (otherwise you end up doing the custom
iteration twice when adding it to QQmlDomAstCreatorBase).

Create a new class called QQmlDomAstCreator that inherits from
QQmlDomAstCreatorBase and uses the custom list iteration on top of it.

Add a test in tst_qmldomitem to make sure that a JS list (that
contains parts which are parsed as PatternElementList) is correctly
loaded in the DOM.

Furthermore, add minimal support for WithStatements in QQmlDomAstCreator
to avoid weird test failures because of writeoutchecks in
tst_qmlformat_cli::settings that uses a file with a with-statement.

Also fix the qmldom tool to correctly output "null" values in JSON
format by simplifying DomBase::dump()'s handling of values, and add a
test for it. Not outputting "null" leads to invalid JSON generation and
a failure in tst_qtquickview_signallistener at build time on android in
the CI.

Change-Id: I7f9258921d8515eb6b3f9cf5dbb2539ffb980aa7
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit enables scriptexpressions for DomCreationOptions::Default.

QQmlDomAstCreator does not know how to handle certain script
expressions, notably JS lists due to the weird way
PatternElementList::accept0() is implemented.

QQmlDomAstCreatorWithQQmlJSScope uses custom list iteration for types
like PatternElementList to make QQmlDomAstCreator support them
correctly.

Move the custom list iteration functionality out of
QQmlDomAstCreatorWithQQmlJSScope so that QQmlDomAstCreator can also
benefit from it.

Rename QQmlDomAstCreator to QQmlDomAstCreatorBase. The Base version does
not do any custom iteration and can be used by
QQmlDomAstCreatorWithQQmlJSScope (otherwise you end up doing the custom
iteration twice when adding it to QQmlDomAstCreatorBase).

Create a new class called QQmlDomAstCreator that inherits from
QQmlDomAstCreatorBase and uses the custom list iteration on top of it.

Add a test in tst_qmldomitem to make sure that a JS list (that
contains parts which are parsed as PatternElementList) is correctly
loaded in the DOM.

Furthermore, add minimal support for WithStatements in QQmlDomAstCreator
to avoid weird test failures because of writeoutchecks in
tst_qmlformat_cli::settings that uses a file with a with-statement.

Also fix the qmldom tool to correctly output "null" values in JSON
format by simplifying DomBase::dump()'s handling of values, and add a
test for it. Not outputting "null" leads to invalid JSON generation and
a failure in tst_qtquickview_signallistener at build time on android in
the CI.

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