<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/qml/parser/qqmljsast.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>QML: Warn about usage of injected signal parameters</title>
<updated>2021-02-12T11:29:18+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2021-02-11T14:09:53+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=df70d4f76f9c1c7b3de9ae91877df803c18b1264'/>
<id>df70d4f76f9c1c7b3de9ae91877df803c18b1264</id>
<content type='text'>
You should declare functions with formal parameters if you want to use
parameters passed by the signal. We need to generate two different
warnings because there are two code paths by which such parameters are
injected. If we compile with qmlcachegen, it simply inserts a lookup
instruction in to the byte code. This lookup then triggers our special
hack expressly made for signal parameters. If we don't compile using
qmlcachegen, a function declaration with formal parameters is
synthesized. We mark those formal parameters as injected and warn if
we see one of them used.

[ChangeLog][QML][Important Behavior Changes] The automatic injection of
signal parameters into signal handlers is deprecated. This is because we
cannot determine the names of the signal parameters at compile time.
Furthermore, also for human readers it is difficult to discern between
arguments, context properties, properties of the current object, and
properties of the root object of the component. Requiring the signal
parameters to be explicitly named resolves some of this confusion. You
can turn the deprecation warning off using the "qt.qml.compiler" and
"qt.qml.context" logging categories.

Task-number: QTBUG-89943
Pick-to: 6.1
Change-Id: If0a5082adb735a73efd793868b3a55bc7d694cbe
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Andrei Golubev &lt;andrei.golubev@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
You should declare functions with formal parameters if you want to use
parameters passed by the signal. We need to generate two different
warnings because there are two code paths by which such parameters are
injected. If we compile with qmlcachegen, it simply inserts a lookup
instruction in to the byte code. This lookup then triggers our special
hack expressly made for signal parameters. If we don't compile using
qmlcachegen, a function declaration with formal parameters is
synthesized. We mark those formal parameters as injected and warn if
we see one of them used.

[ChangeLog][QML][Important Behavior Changes] The automatic injection of
signal parameters into signal handlers is deprecated. This is because we
cannot determine the names of the signal parameters at compile time.
Furthermore, also for human readers it is difficult to discern between
arguments, context properties, properties of the current object, and
properties of the root object of the component. Requiring the signal
parameters to be explicitly named resolves some of this confusion. You
can turn the deprecation warning off using the "qt.qml.compiler" and
"qt.qml.context" logging categories.

Task-number: QTBUG-89943
Pick-to: 6.1
Change-Id: If0a5082adb735a73efd793868b3a55bc7d694cbe
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Andrei Golubev &lt;andrei.golubev@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix QtQml after QMetaType/QVariant changes in Qt Core</title>
<updated>2020-08-28T11:49:11+00:00</updated>
<author>
<name>Lars Knoll</name>
<email>lars.knoll@qt.io</email>
</author>
<published>2020-07-10T08:33:49+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=2afed94c70913e018198422ef222c9168326d09c'/>
<id>2afed94c70913e018198422ef222c9168326d09c</id>
<content type='text'>
Change-Id: I2a983cf8188e88d80d3b7726208d821427eb8f3c
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I2a983cf8188e88d80d3b7726208d821427eb8f3c
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Adapt to qtbase changes</title>
<updated>2020-08-23T18:50:04+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2020-08-17T08:59:47+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=48b4c1f450109b148f03f62574d78b460859c4a1'/>
<id>48b4c1f450109b148f03f62574d78b460859c4a1</id>
<content type='text'>
The internal QVariant constructor taking a QMetaTypeId has been removed.
Thus, construct QMetaTypes where necessary from the id, or avoid a
QMetaType -&gt; ID -&gt; QMetaType roundtrip where we already have a metatype.
Also fix a few missing includse that were previously transitively
included.

Change-Id: I56ce92281d616108a4ff80fe5052b919d1282357
Reviewed-by: Fawzi Mohamed &lt;fawzi.mohamed@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The internal QVariant constructor taking a QMetaTypeId has been removed.
Thus, construct QMetaTypes where necessary from the id, or avoid a
QMetaType -&gt; ID -&gt; QMetaType roundtrip where we already have a metatype.
Also fix a few missing includse that were previously transitively
included.

Change-Id: I56ce92281d616108a4ff80fe5052b919d1282357
Reviewed-by: Fawzi Mohamed &lt;fawzi.mohamed@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix 'as' binary operation using invalid types</title>
<updated>2020-05-20T11:46:36+00:00</updated>
<author>
<name>Maximilian Goldstein</name>
<email>max.goldstein@qt.io</email>
</author>
<published>2020-05-13T13:31:51+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=1c0c8509da2a27858f7b25ffa71d1b19690c708c'/>
<id>1c0c8509da2a27858f7b25ffa71d1b19690c708c</id>
<content type='text'>
Fixes: QTBUG-81392
Change-Id: Ic83091c547a7854b7fa86b44d93c575bd7426bae
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@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>
Fixes: QTBUG-81392
Change-Id: Ic83091c547a7854b7fa86b44d93c575bd7426bae
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add UiAnnotation for annotation objects</title>
<updated>2020-02-12T17:28:46+00:00</updated>
<author>
<name>Fawzi Mohamed</name>
<email>fawzi.mohamed@qt.io</email>
</author>
<published>2020-02-11T15:13:36+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=41e8f8a7c6aa4a530abdbc52f8014c4563e85417'/>
<id>41e8f8a7c6aa4a530abdbc52f8014c4563e85417</id>
<content type='text'>
This is a partial patch that is fuilly fixed with the following
one (big restructure) because it needs extra visit methods,
and that leads to conflicts, but I think it gets lost if merged with
the next one.

Change-Id: I54331a47a5c7faaf78a97e580825d1feec5adf92
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a partial patch that is fuilly fixed with the following
one (big restructure) because it needs extra visit methods,
and that leads to conflicts, but I think it gets lost if merged with
the next one.

Change-Id: I54331a47a5c7faaf78a97e580825d1feec5adf92
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce BaseVisitor</title>
<updated>2020-02-12T17:28:17+00:00</updated>
<author>
<name>Fawzi Mohamed</name>
<email>fawzi.mohamed@qt.io</email>
</author>
<published>2020-02-11T15:22:12+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=c2e756dc1962eeb3575f618b38272359d4fccc89'/>
<id>c2e756dc1962eeb3575f618b38272359d4fccc89</id>
<content type='text'>
Base Visitor is an abstract visitor that has all visit methods
abstract, subclassing this one gets an error if some visit method is
not implemented (dumper and reformatter for example will gain from
this.

Change-Id: I3f8cfeb6fc0ef917acf725bbe1c293d761304287
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Base Visitor is an abstract visitor that has all visit methods
abstract, subclassing this one gets an error if some visit method is
not implemented (dumper and reformatter for example will gain from
this.

Change-Id: I3f8cfeb6fc0ef917acf725bbe1c293d761304287
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Mark non visited AST parts</title>
<updated>2020-02-12T09:17:27+00:00</updated>
<author>
<name>Fawzi Mohamed</name>
<email>fawzi.mohamed@qt.io</email>
</author>
<published>2020-02-06T13:20:16+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=9b1dc349a58f82d130feb73dcd30f3766c924d20'/>
<id>9b1dc349a58f82d130feb73dcd30f3766c924d20</id>
<content type='text'>
Add a commented out accept call for the non visited fields in accept0

Change-Id: Icb1ab0c77440f4c3eae5404bff2cf71086f96a2f
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a commented out accept call for the non visited fields in accept0

Change-Id: Icb1ab0c77440f4c3eae5404bff2cf71086f96a2f
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add annotations to AST</title>
<updated>2020-02-12T09:17:18+00:00</updated>
<author>
<name>Fawzi Mohamed</name>
<email>fawzi.mohamed@qt.io</email>
</author>
<published>2020-02-06T13:15:09+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=87f5cc385b670a63c2f2ba0ef90cba95ab215200'/>
<id>87f5cc385b670a63c2f2ba0ef90cba95ab215200</id>
<content type='text'>
Annotations are added to UiObjectMember.
This makes it easy to find the annotations of any UiObjectMember
through the annotations attribute.

The clean AST approach would add an UiAnnotatedObjectMember that contains
both the annotation list and an UiObjectMember, but that makes
finding the annotation more difficult.

The annotations are not visited by default, if one wants to dump them
before the current object the simplest way is to use the preVisit and
use .uiObjectMemberCast().
Depending on how we use annotation we could change the current
approach.

Task-number: QTBUG-81714
Change-Id: I543a2cfe5157bcc86de6de9faebde9aea22974eb
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Annotations are added to UiObjectMember.
This makes it easy to find the annotations of any UiObjectMember
through the annotations attribute.

The clean AST approach would add an UiAnnotatedObjectMember that contains
both the annotation list and an UiObjectMember, but that makes
finding the annotation more difficult.

The annotations are not visited by default, if one wants to dump them
before the current object the simplest way is to use the preVisit and
use .uiObjectMemberCast().
Depending on how we use annotation we could change the current
approach.

Task-number: QTBUG-81714
Change-Id: I543a2cfe5157bcc86de6de9faebde9aea22974eb
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Required properties: Allow retroactive require specification</title>
<updated>2020-01-31T13:46:03+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2020-01-30T09:51:34+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=85f15e2af40be1e9500fe600daba31839b904ef4'/>
<id>85f15e2af40be1e9500fe600daba31839b904ef4</id>
<content type='text'>
It is now possible to mark a property of a parent class as required in
the child by writing required &lt;propertyName&gt;

Change-Id: I9e9d58c7b5c00577b056e905b39744b2fa359ea0
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is now possible to mark a property of a parent class as required in
the child by writing required &lt;propertyName&gt;

Change-Id: I9e9d58c7b5c00577b056e905b39744b2fa359ea0
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Long live QML inline components</title>
<updated>2020-01-23T14:58:10+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2020-01-15T13:47:35+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=684f9df7849bc79f1f02a60844fb43c7a3927d2f'/>
<id>684f9df7849bc79f1f02a60844fb43c7a3927d2f</id>
<content type='text'>
[ChangeLog][QtQml] It is now possible to declare new QML components in
a QML file via the component keyword. They can be used just as if they
were declared in another file, with the only difference that the type
name needs to be prefixed with the name of the containing type outside
of the file were the inline component has been declared.

Notably, inline components are not closures: In the following
example, the output would be 42

// MyItem.qml
Item {
    property int i: 33
    component IC: Item {
        Component.onCompleted: console.log(i)
    }
}
// user.qml
Item {
    property int i: 42
    MyItem.IC {}
}

Fixes: QTBUG-79382
Change-Id: I6a5ffc43f093a76323f435cfee9bab217781b8f5
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ChangeLog][QtQml] It is now possible to declare new QML components in
a QML file via the component keyword. They can be used just as if they
were declared in another file, with the only difference that the type
name needs to be prefixed with the name of the containing type outside
of the file were the inline component has been declared.

Notably, inline components are not closures: In the following
example, the output would be 42

// MyItem.qml
Item {
    property int i: 33
    component IC: Item {
        Component.onCompleted: console.log(i)
    }
}
// user.qml
Item {
    property int i: 42
    MyItem.IC {}
}

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