<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/quick/items/qquickitem.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>Clarify QQuickItem::map{To,From}Item when passed a nullptr</title>
<updated>2024-01-15T13:02:56+00:00</updated>
<author>
<name>Tor Arne Vestbø</name>
<email>tor.arne.vestbo@qt.io</email>
</author>
<published>2023-12-21T15:00:43+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=8ed9f545b9339872f93b8adf5e6bd1820b561fa3'/>
<id>8ed9f545b9339872f93b8adf5e6bd1820b561fa3</id>
<content type='text'>
Passing nullptr when mapping to/from an item results in mapping
relative to the scene's coordinate system, and this is also what
the "Scene Coordinates" section of "Concepts - Visual Coordinates
in Qt Quick" documents.

Avoid the ambiguous term "root QML view", which may be mistaken for
the top level window in a child-window scenario.

Pick-to: 6.5
Change-Id: Ibd386ec8248f5e398b04248d15c7cf48bd46c090
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
(cherry picked from commit 2ea08a9918343002a5ddf20f3c48c577fb27544c)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
(cherry picked from commit b0cc7939b88d855f803d48a4c41c5bf5e51d3e8b)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Passing nullptr when mapping to/from an item results in mapping
relative to the scene's coordinate system, and this is also what
the "Scene Coordinates" section of "Concepts - Visual Coordinates
in Qt Quick" documents.

Avoid the ambiguous term "root QML view", which may be mistaken for
the top level window in a child-window scenario.

Pick-to: 6.5
Change-Id: Ibd386ec8248f5e398b04248d15c7cf48bd46c090
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
(cherry picked from commit 2ea08a9918343002a5ddf20f3c48c577fb27544c)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
(cherry picked from commit b0cc7939b88d855f803d48a4c41c5bf5e51d3e8b)
</pre>
</div>
</content>
</entry>
<entry>
<title>Include QML object id in QQuickItem debug output</title>
<updated>2023-12-04T22:18:23+00:00</updated>
<author>
<name>Tor Arne Vestbø</name>
<email>tor.arne.vestbo@qt.io</email>
</author>
<published>2023-11-15T23:44:59+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=21ffbcb27a20767a9ba308c767a7d6f9cc704110'/>
<id>21ffbcb27a20767a9ba308c767a7d6f9cc704110</id>
<content type='text'>
Knowing which specific item you're dealing with is often useful
during debugging. Having the identifier as part of the debug output
saves having to add an objectName to each item you're debugging.

Pick-to: 6.5
Change-Id: Id1b91725b961b790d80e28d6be9d084fe737af04
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 3d3de0f5a47a249a0229edcca18cf71826bd4bc0)
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>
Knowing which specific item you're dealing with is often useful
during debugging. Having the identifier as part of the debug output
saves having to add an objectName to each item you're debugging.

Pick-to: 6.5
Change-Id: Id1b91725b961b790d80e28d6be9d084fe737af04
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 3d3de0f5a47a249a0229edcca18cf71826bd4bc0)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickItem: more fixes for bindable properties</title>
<updated>2023-10-18T13:10:48+00:00</updated>
<author>
<name>Ivan Solovev</name>
<email>ivan.solovev@qt.io</email>
</author>
<published>2023-10-16T13:58:54+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=6447671abe894d01dcea8232eff0ce1f3ee25360'/>
<id>6447671abe894d01dcea8232eff0ce1f3ee25360</id>
<content type='text'>
A more detailed look revealed some more places where the properties
were incorrectly accessed from the setters.
Use the usual (set)ValueBypassingBindings() approach to fix it.

The exceptions from the usual property handling are the setSize()
and setPosition() setters. The first one is documented to not
remove the binding, and the second one has a comment stating the
same. So, do not call removeBindingUnlessInWrapper() in these
setters.

This commit amends f85de757355889f534e9e5e858547874eb377ec5

Task-number: QTBUG-117899
Pick-to: 6.5
Change-Id: I97a94cbf2b38c57e9a260e54c9894c2ffd47271d
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 e8c8ddeb942f4410533e5e808c4138efb3ce4b2a)
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>
A more detailed look revealed some more places where the properties
were incorrectly accessed from the setters.
Use the usual (set)ValueBypassingBindings() approach to fix it.

The exceptions from the usual property handling are the setSize()
and setPosition() setters. The first one is documented to not
remove the binding, and the second one has a comment stating the
same. So, do not call removeBindingUnlessInWrapper() in these
setters.

This commit amends f85de757355889f534e9e5e858547874eb377ec5

Task-number: QTBUG-117899
Pick-to: 6.5
Change-Id: I97a94cbf2b38c57e9a260e54c9894c2ffd47271d
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 e8c8ddeb942f4410533e5e808c4138efb3ce4b2a)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickItem: fix binding loops for x, y, width, and height</title>
<updated>2023-09-19T16:24:58+00:00</updated>
<author>
<name>Ivan Solovev</name>
<email>ivan.solovev@qt.io</email>
</author>
<published>2023-09-18T13:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=b3b9987ebd2f0d17f755228e06faddd2a67525b0'/>
<id>b3b9987ebd2f0d17f755228e06faddd2a67525b0</id>
<content type='text'>
Use {set}ValueBypassingBinding() to read and write the value of the
property.
Use valueBypassingBinding() to get the values of other realted
properties before calling geometryChanged().

The tests for these bindable properties already exist. They will detect
the binding loops as soon as the related qtbase patch is merged.

Fixes: QTBUG-116540
Pick-to: 6.5
Change-Id: Ifb6caac2d5176fa6985a170fcdfe0dceeac10936
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
(cherry picked from commit f85de757355889f534e9e5e858547874eb377ec5)
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>
Use {set}ValueBypassingBinding() to read and write the value of the
property.
Use valueBypassingBinding() to get the values of other realted
properties before calling geometryChanged().

The tests for these bindable properties already exist. They will detect
the binding loops as soon as the related qtbase patch is merged.

Fixes: QTBUG-116540
Pick-to: 6.5
Change-Id: Ifb6caac2d5176fa6985a170fcdfe0dceeac10936
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
(cherry picked from commit f85de757355889f534e9e5e858547874eb377ec5)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Loader: re-set ItemObservesViewport flag on child if already set</title>
<updated>2023-09-12T19:03:21+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2023-09-06T15:18:42+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=584cd7239020e598df088a1b4669d3e69ff4650f'/>
<id>584cd7239020e598df088a1b4669d3e69ff4650f</id>
<content type='text'>
When QQuickLoaderPrivate::load() loads a Text item, its ctor calls
QQuickTextPrivate::init(), which calls setFlag(ItemObservesViewport).
QQuickItem::setFlag() tries to go up the parent hierarchy to get
subtreeTransformChangedEnabled turned on; but at that time, the Text
does not yet have a parent.

If a Flickable contains a Loader that loads a Text with large content,
QQuickTextPrivate::transformChanged() needs to get called during
scrolling. Loader is not interested in these notifications for itself;
so its parent's QQuickItemPrivate::transformChanged() detects that and
turns off subtreeTransformChangedEnabled. After the child is loaded,
QQuickLoader::itemChange() detects that the child's ItemObservesViewport
is already set, and sets the same flag again. setFlag() doesn't have a
guard, so the parent traversal happens again, and
subtreeTransformChangedEnabled gets turned back on.

If a different child were loaded, and that child did not want the
notifications, the next QQuickItemPrivate::transformChanged()
would detect it. If the child changed its own flag later on (e.g.
because a small amount of text was replaced with a larger document,
exceeding QQUICKTEXT_LARGETEXT_THRESHOLD), QQuickItem::setFlag() would
be able to go up the parent chain at that time.

For the autotest, long.qml has about 15KB of text. Maybe it will
be reusable. At least it should compress well in git packfiles,
since we have this license text elsewhere.

Fixes: QTBUG-115687
Change-Id: I87b6a42f5735b8f9c2267f91a4112681da05de5d
Reviewed-by: Santhosh Kumar &lt;santhosh.kumar.selvaraj@qt.io&gt;
(cherry picked from commit 8c7c60fff37ea7bb7420d925e2f88e62764bf86b)
Reviewed-by: Volker Hilsheimer &lt;volker.hilsheimer@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When QQuickLoaderPrivate::load() loads a Text item, its ctor calls
QQuickTextPrivate::init(), which calls setFlag(ItemObservesViewport).
QQuickItem::setFlag() tries to go up the parent hierarchy to get
subtreeTransformChangedEnabled turned on; but at that time, the Text
does not yet have a parent.

If a Flickable contains a Loader that loads a Text with large content,
QQuickTextPrivate::transformChanged() needs to get called during
scrolling. Loader is not interested in these notifications for itself;
so its parent's QQuickItemPrivate::transformChanged() detects that and
turns off subtreeTransformChangedEnabled. After the child is loaded,
QQuickLoader::itemChange() detects that the child's ItemObservesViewport
is already set, and sets the same flag again. setFlag() doesn't have a
guard, so the parent traversal happens again, and
subtreeTransformChangedEnabled gets turned back on.

If a different child were loaded, and that child did not want the
notifications, the next QQuickItemPrivate::transformChanged()
would detect it. If the child changed its own flag later on (e.g.
because a small amount of text was replaced with a larger document,
exceeding QQUICKTEXT_LARGETEXT_THRESHOLD), QQuickItem::setFlag() would
be able to go up the parent chain at that time.

For the autotest, long.qml has about 15KB of text. Maybe it will
be reusable. At least it should compress well in git packfiles,
since we have this license text elsewhere.

Fixes: QTBUG-115687
Change-Id: I87b6a42f5735b8f9c2267f91a4112681da05de5d
Reviewed-by: Santhosh Kumar &lt;santhosh.kumar.selvaraj@qt.io&gt;
(cherry picked from commit 8c7c60fff37ea7bb7420d925e2f88e62764bf86b)
Reviewed-by: Volker Hilsheimer &lt;volker.hilsheimer@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Show info about pointer handlers in Item.dumpItemTree</title>
<updated>2023-05-25T06:26:12+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2023-05-23T09:14:41+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=5c844a30ac9280a1980c2187be79dfe045cbb76e'/>
<id>5c844a30ac9280a1980c2187be79dfe045cbb76e</id>
<content type='text'>
When trying to understand event delivery, one needs to see the handlers
too, not just the items. For example, this can help to troubleshoot
hover delivery: is the thing that's not getting hovered really a sibling
of something that is getting it?

Task-number: QTBUG-104624
Change-Id: I67d0ff0d30b9107df91aea697675261a602158ca
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When trying to understand event delivery, one needs to see the handlers
too, not just the items. For example, this can help to troubleshoot
hover delivery: is the thing that's not getting hovered really a sibling
of something that is getting it?

Task-number: QTBUG-104624
Change-Id: I67d0ff0d30b9107df91aea697675261a602158ca
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickItem: Do not synthesize replace() for data/resources/children</title>
<updated>2023-05-09T19:28:06+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2023-05-02T14:06:25+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=7e1988539983531ecce589d76479f5bbe9bdb9b6'/>
<id>7e1988539983531ecce589d76479f5bbe9bdb9b6</id>
<content type='text'>
Those properties are not actually sequential containers. They have some
internal logic that refuses certain operations and changes the semantics
of others. We should not run things like splice() on them.

We can natively implement removeLast(), though.

Pick-to: 6.5
Fixes: QTBUG-112949
Change-Id: Ic9fa84f98a68428df9e958ba7fc72b0987e8601f
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Those properties are not actually sequential containers. They have some
internal logic that refuses certain operations and changes the semantics
of others. We should not run things like splice() on them.

We can natively implement removeLast(), though.

Pick-to: 6.5
Fixes: QTBUG-112949
Change-Id: Ic9fa84f98a68428df9e958ba7fc72b0987e8601f
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Accessibility: respect value in attached Accessible in controls</title>
<updated>2023-04-21T14:42:56+00:00</updated>
<author>
<name>Volker Hilsheimer</name>
<email>volker.hilsheimer@qt.io</email>
</author>
<published>2023-04-18T20:05:36+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=3c08d08ae2bbd449cc0579a1b3cb499383c7a60c'/>
<id>3c08d08ae2bbd449cc0579a1b3cb499383c7a60c</id>
<content type='text'>
QQuickItemPrivate::accessibleRole is virtual and called by the framework
to determine the role of an item. The default implementation checks and
respects a possible Accessible attached object. However, subclasses that
override the virtual don't, so the attached properties are ignored, and
the class-specific implementation wins. This makes it impossible to
change the role of e.g. a checkable button.

To fix that, move the code respecting the attached object into a non-
virtual function that the framework calls instead, and only call the
virtual member if there is no attached object, or if that object is not
initialized with a role. Replace calls to the virtual from the
framework with calls to the non-virtual wrapper.

Do this for both QQuickItem and for QQuickPopup, and adjust the logic
in QQuickControl types that create an attached object and initialize
it's role when accessibility becomes active. Use the non-overridable
effective role value for that as well.

Add a test case, and to avoid any new framework calls to the virtual,
make it private.

Fixes: QTBUG-110114
Pick-to: 6.5 6.2
Change-Id: Ia709cecbd181b6d8ee3297a4af60c1e7db9a2c51
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
QQuickItemPrivate::accessibleRole is virtual and called by the framework
to determine the role of an item. The default implementation checks and
respects a possible Accessible attached object. However, subclasses that
override the virtual don't, so the attached properties are ignored, and
the class-specific implementation wins. This makes it impossible to
change the role of e.g. a checkable button.

To fix that, move the code respecting the attached object into a non-
virtual function that the framework calls instead, and only call the
virtual member if there is no attached object, or if that object is not
initialized with a role. Replace calls to the virtual from the
framework with calls to the non-virtual wrapper.

Do this for both QQuickItem and for QQuickPopup, and adjust the logic
in QQuickControl types that create an attached object and initialize
it's role when accessibility becomes active. Use the non-overridable
effective role value for that as well.

Add a test case, and to avoid any new framework calls to the virtual,
make it private.

Fixes: QTBUG-110114
Pick-to: 6.5 6.2
Change-Id: Ia709cecbd181b6d8ee3297a4af60c1e7db9a2c51
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Doc: add a general statement about QQuickItem::visible</title>
<updated>2023-04-18T11:11:16+00:00</updated>
<author>
<name>Volker Hilsheimer</name>
<email>volker.hilsheimer@qt.io</email>
</author>
<published>2023-04-17T08:58:45+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=5ba3db2126cc97232e8f48d967fe30e39e339669'/>
<id>5ba3db2126cc97232e8f48d967fe30e39e339669</id>
<content type='text'>
For items not added to a scene, the value of the property is somewhat
unpredictable and should generally not be relied upon. Amends
d1b9a4cacfb966cf0a37983d8f8044f3aedf5de3.

Fixes: QTBUG-112838
Pick-to: 6.5
Change-Id: I4caf46d5497c676e870763d2cb7dcc9c00684f0d
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For items not added to a scene, the value of the property is somewhat
unpredictable and should generally not be relied upon. Amends
d1b9a4cacfb966cf0a37983d8f8044f3aedf5de3.

Fixes: QTBUG-112838
Pick-to: 6.5
Change-Id: I4caf46d5497c676e870763d2cb7dcc9c00684f0d
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>De-inline QQuickItemChangeListener destructor and export class</title>
<updated>2023-04-17T23:23:02+00:00</updated>
<author>
<name>Volker Hilsheimer</name>
<email>volker.hilsheimer@qt.io</email>
</author>
<published>2023-04-16T13:48:36+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=75a45dfbbf499641bd68ae4d719ffb83d9072882'/>
<id>75a45dfbbf499641bd68ae4d719ffb83d9072882</id>
<content type='text'>
With all virtuals inline, every module that has types deriving from
this class will have their own vtable for it, which is both unnecessary
and dangerous if we want to dynamic_cast from or two this type.

By de-inlining the destructor we pin the vtable of the class to
QtQuick.

Pick-to: 6.5
Change-Id: Iaf83a1d7391e73992a44d5cd651b0194ea43d31c
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With all virtuals inline, every module that has types deriving from
this class will have their own vtable for it, which is both unnecessary
and dangerous if we want to dynamic_cast from or two this type.

By de-inlining the destructor we pin the vtable of the class to
QtQuick.

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