<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/quicktemplates2/qquickaction.cpp, branch wip/material3</title>
<subtitle>Qt Declarative (Quick 2)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/'/>
<entry>
<title>Remove "2" from Qt Quick Controls directories</title>
<updated>2022-12-01T02:26:20+00:00</updated>
<author>
<name>Mitch Curtis</name>
<email>mitch.curtis@qt.io</email>
</author>
<published>2022-11-18T07:15:16+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=4bd87b903b355b53e3105ba1ae7c154c4e55cdaf'/>
<id>4bd87b903b355b53e3105ba1ae7c154c4e55cdaf</id>
<content type='text'>
Qt Quick Controls 2 was named that way because it was a follow-up to
Qt Quick Controls 1.x. Now that Qt Quick Controls 1 is no longer
supported, we don't need to have "2" in the name. Work on this was
already started for the documentation in
1abdfe5d5a052f2298b7bf657513dfa7e0c66a56.

By doing this renaming a few weeks before feature freeze, it won't
affect the release but still results in as little time possible spent
manually fixing conflicts in cherry-picks from non-LTS releases as a
result of the renaming.

This patch does the following:

- Renames directories.
- Adapts CMakeLists.txt and other files to account for the new paths.

A follow-up patch will handle documentation.

It does not touch library names or other user-facing stuff, as that
will have to be done in Qt 7.

Task-number: QTBUG-95413
Change-Id: I170d8db19033ee71e495ff0c5c1a517a41ed7634
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Qt Quick Controls 2 was named that way because it was a follow-up to
Qt Quick Controls 1.x. Now that Qt Quick Controls 1 is no longer
supported, we don't need to have "2" in the name. Work on this was
already started for the documentation in
1abdfe5d5a052f2298b7bf657513dfa7e0c66a56.

By doing this renaming a few weeks before feature freeze, it won't
affect the release but still results in as little time possible spent
manually fixing conflicts in cherry-picks from non-LTS releases as a
result of the renaming.

This patch does the following:

- Renames directories.
- Adapts CMakeLists.txt and other files to account for the new paths.

A follow-up patch will handle documentation.

It does not touch library names or other user-facing stuff, as that
will have to be done in Qt 7.

Task-number: QTBUG-95413
Change-Id: I170d8db19033ee71e495ff0c5c1a517a41ed7634
Reviewed-by: Mitch Curtis &lt;mitch.curtis@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>Use SPDX license identifiers</title>
<updated>2022-06-11T06:05:15+00:00</updated>
<author>
<name>Lucie Gérard</name>
<email>lucie.gerard@qt.io</email>
</author>
<published>2022-05-13T13:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=0dc4fd240a2897c5c443a0ef6d84c416843e4938'/>
<id>0dc4fd240a2897c5c443a0ef6d84c416843e4938</id>
<content type='text'>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickIcon: Resolve source URL relative to outermost property owner</title>
<updated>2022-02-18T02:26:44+00:00</updated>
<author>
<name>Yuya Nishihara</name>
<email>yuya@tcha.org</email>
</author>
<published>2022-02-14T11:52:20+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=dfc16e40ab43e8062b93c566e4316efe4d4f10a0'/>
<id>dfc16e40ab43e8062b93c566e4316efe4d4f10a0</id>
<content type='text'>
The original attempt, deb238586a "QQuickIcon: Resolve URL relative to
current element," works fine for IconLabel itself, but not for Buttons
containing IconLabel.

  // &lt;style&gt;/Button.qml
  T.Button {
      id: control
      icon:  // owner: control
      contentItem: IconLabel {
          icon: control.icon  // owner: this, but should be control
      }
  }

  // user code
  Button { icon.source: "a.png" }

Since IconLabel is an implementation detail of the Button, IconLabel.icon
owner needs to point to the Button so the user-specified icon.source can
be resolved relative to the user code, not to the &lt;style&gt;/ directory.

This patch fixes the problem by explicitly resolving the source URL on
setIcon() and propagating the resolved icon object to the inner items.
If the relative URL has already been resolved by e.g. Button, the inner
IconLabel never resolves the URL again to itself.

The problem could be addressed by initializing icon owner only once by
Action/Button constructor, but that would lead to dangling owner pointer
as icon object could be copied anywhere. So I've added resolvedSource
data member in place of the owner pointer.

  Button { id: dangling }
  Button { id: victim; icon: dangling.icon }  // owner: dangling
  Component.onCompleted: dangling.destroy()
  // ... would SEGV (or use after free) if victim.icon.source modified.

Fixes: QTBUG-95587
Pick-to: 6.2 6.3
Change-Id: Ibdd07118e79f1e1f36e1faea0289150eca734e27
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The original attempt, deb238586a "QQuickIcon: Resolve URL relative to
current element," works fine for IconLabel itself, but not for Buttons
containing IconLabel.

  // &lt;style&gt;/Button.qml
  T.Button {
      id: control
      icon:  // owner: control
      contentItem: IconLabel {
          icon: control.icon  // owner: this, but should be control
      }
  }

  // user code
  Button { icon.source: "a.png" }

Since IconLabel is an implementation detail of the Button, IconLabel.icon
owner needs to point to the Button so the user-specified icon.source can
be resolved relative to the user code, not to the &lt;style&gt;/ directory.

This patch fixes the problem by explicitly resolving the source URL on
setIcon() and propagating the resolved icon object to the inner items.
If the relative URL has already been resolved by e.g. Button, the inner
IconLabel never resolves the URL again to itself.

The problem could be addressed by initializing icon owner only once by
Action/Button constructor, but that would lead to dangling owner pointer
as icon object could be copied anywhere. So I've added resolvedSource
data member in place of the owner pointer.

  Button { id: dangling }
  Button { id: victim; icon: dangling.icon }  // owner: dangling
  Component.onCompleted: dangling.destroy()
  // ... would SEGV (or use after free) if victim.icon.source modified.

Fixes: QTBUG-95587
Pick-to: 6.2 6.3
Change-Id: Ibdd07118e79f1e1f36e1faea0289150eca734e27
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use up-to date LGPL license header</title>
<updated>2021-11-29T08:21:34+00:00</updated>
<author>
<name>Kai Köhne</name>
<email>kai.koehne@qt.io</email>
</author>
<published>2021-11-25T16:22:05+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=5d4679289bc5a46df4f767e7eabcee0bcf99169d'/>
<id>5d4679289bc5a46df4f767e7eabcee0bcf99169d</id>
<content type='text'>
Remove usages of outdated LGPL3 header that references LICENSES.LGPLv3
instead of LICENSES.LGPL3.

Change-Id: If7a90ec18331a68491c5a740f131a5e7b3f37df4
Reviewed-by: Volker Hilsheimer &lt;volker.hilsheimer@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove usages of outdated LGPL3 header that references LICENSES.LGPLv3
instead of LICENSES.LGPL3.

Change-Id: If7a90ec18331a68491c5a740f131a5e7b3f37df4
Reviewed-by: Volker Hilsheimer &lt;volker.hilsheimer@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickAction: don't grab the same shortcut multiple times</title>
<updated>2021-09-23T11:23:26+00:00</updated>
<author>
<name>Oliver Eftevaag</name>
<email>oliver.eftevaag@qt.io</email>
</author>
<published>2021-09-20T10:40:38+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=45af5ef2f63704adc515e29260ad8c6aaf51f08e'/>
<id>45af5ef2f63704adc515e29260ad8c6aaf51f08e</id>
<content type='text'>
If the entry for the QQuickItem that the QQuickAction is set on has
already grabbed the shortcut, then m_shortcutId is no longer 0 and we
must not overwrite the value. Otherwise, the QQuickItem removing itself
from the action might not remove the correct entry from Qt's shortcut
map, leaving a dangling pointer behind.

Multiple calls to QQuickActionPrivate::ShortcutEntry::grab are possible,
because we grab the shortcut whenever the shortcut changes, or when an
item representing the action becomes visible.

The test case added reproduces this scenario by adding the action to a
menu item and then making the menu explicitly visible, resulting in two
calls to grab() which should be idempotent.

Fixes: QTBUG-96551
Fixes: QTBUG-96561
Pick-to: 6.2
Change-Id: I7d42a4f4c04f7d8759f2d0f24a133720f10e4c47
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
Reviewed-by: Jarkko Koivikko &lt;jarkko.koivikko@code-q.fi&gt;
Reviewed-by: Volker Hilsheimer &lt;volker.hilsheimer@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the entry for the QQuickItem that the QQuickAction is set on has
already grabbed the shortcut, then m_shortcutId is no longer 0 and we
must not overwrite the value. Otherwise, the QQuickItem removing itself
from the action might not remove the correct entry from Qt's shortcut
map, leaving a dangling pointer behind.

Multiple calls to QQuickActionPrivate::ShortcutEntry::grab are possible,
because we grab the shortcut whenever the shortcut changes, or when an
item representing the action becomes visible.

The test case added reproduces this scenario by adding the action to a
menu item and then making the menu explicitly visible, resulting in two
calls to grab() which should be idempotent.

Fixes: QTBUG-96551
Fixes: QTBUG-96561
Pick-to: 6.2
Change-Id: I7d42a4f4c04f7d8759f2d0f24a133720f10e4c47
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
Reviewed-by: Jarkko Koivikko &lt;jarkko.koivikko@code-q.fi&gt;
Reviewed-by: Volker Hilsheimer &lt;volker.hilsheimer@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickIcon: Resolve URL relative to current element</title>
<updated>2021-09-20T15:46:52+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2021-09-03T10:23:15+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=deb238586a4420f6848fb60b3356ec6220b86b17'/>
<id>deb238586a4420f6848fb60b3356ec6220b86b17</id>
<content type='text'>
If a user passes a relative URL to icon, they probably expect the URL to
be handled relative to the current file (like in Qt 5). We restore this
behavior by doing the URL resolution in the current QML context.
Unfortunately, as a gadget, QQuickIcon does not have its own context.
Thus, we need to store (and set) a pointer to its "owner", so that we can
retrieve the context for the binding that causes the URL to be set.
We adjust the three classes which currently use QQuickIcon to set the
owner in their setIcon methods.

Task-number: QTBUG-95587
Pick-to: 6.2
Change-Id: Icd1f2ddf65ae7d09ff787a50a01f1db78c571abf
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
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>
If a user passes a relative URL to icon, they probably expect the URL to
be handled relative to the current file (like in Qt 5). We restore this
behavior by doing the URL resolution in the current QML context.
Unfortunately, as a gadget, QQuickIcon does not have its own context.
Thus, we need to store (and set) a pointer to its "owner", so that we can
retrieve the context for the binding that causes the URL to be set.
We adjust the three classes which currently use QQuickIcon to set the
owner in their setIcon methods.

Task-number: QTBUG-95587
Pick-to: 6.2
Change-Id: Icd1f2ddf65ae7d09ff787a50a01f1db78c571abf
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
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>Doc: remove all instances of \qmlpropertygroup</title>
<updated>2020-11-09T11:58:27+00:00</updated>
<author>
<name>Mitch Curtis</name>
<email>mitch.curtis@qt.io</email>
</author>
<published>2020-11-06T09:45:58+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=08477f64d8b1a7161ad884551c84cffab0e7d5be'/>
<id>08477f64d8b1a7161ad884551c84cffab0e7d5be</id>
<content type='text'>
This is apparently no longer necessary.

Pick-to: 5.15
Change-Id: I0f45a84ced5118d248ffab4e745c4e2f2ce5738f
Reviewed-by: Paul Wicking &lt;paul.wicking@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is apparently no longer necessary.

Pick-to: 5.15
Change-Id: I0f45a84ced5118d248ffab4e745c4e2f2ce5738f
Reviewed-by: Paul Wicking &lt;paul.wicking@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix deprecation warnings related to QMetaType</title>
<updated>2020-11-02T10:45:51+00:00</updated>
<author>
<name>Friedemann Kleint</name>
<email>Friedemann.Kleint@qt.io</email>
</author>
<published>2020-11-02T10:39:07+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=4e10a6769fdcaa711dac34dd5dd326c83a27c6bd'/>
<id>4e10a6769fdcaa711dac34dd5dd326c83a27c6bd</id>
<content type='text'>
Change-Id: I4e6c1b03915c33f6225c0fb7f86e6acb7715cd4d
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I4e6c1b03915c33f6225c0fb7f86e6acb7715cd4d
Reviewed-by: Mitch Curtis &lt;mitch.curtis@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Doc: mention cache property in the relevant places</title>
<updated>2020-07-15T08:47:35+00:00</updated>
<author>
<name>Mitch Curtis</name>
<email>mitch.curtis@qt.io</email>
</author>
<published>2020-07-14T13:37:47+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=feabd686a31d257638d9cdc80c6dd36e8709e279'/>
<id>feabd686a31d257638d9cdc80c6dd36e8709e279</id>
<content type='text'>
This was missed in 033564edf5b79e32da63597930e25105a3442f01.

Pick-to: 5.15
Change-Id: I7bc465338d5b9960ad7b746a816cd33efcca1bdc
Reviewed-by: Volker Hilsheimer &lt;volker.hilsheimer@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was missed in 033564edf5b79e32da63597930e25105a3442f01.

Pick-to: 5.15
Change-Id: I7bc465338d5b9960ad7b746a816cd33efcca1bdc
Reviewed-by: Volker Hilsheimer &lt;volker.hilsheimer@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
