<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/quick/items/qquickitemview.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>QQuickItemView: Fix max(X/Y)Extent()</title>
<updated>2022-11-22T16:01:07+00:00</updated>
<author>
<name>David Redondo</name>
<email>kde@david-redondo.de</email>
</author>
<published>2020-05-13T09:04:23+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=99047ae219ff6689da38cc988a25030fece655da'/>
<id>99047ae219ff6689da38cc988a25030fece655da</id>
<content type='text'>
QQuickFlickable maxXExtent() and maxYExtent() return the amount of space
that is not shown when inside a ScrollView. QQuickItemView however just
returned width() if vertical and height() if horizontal. In these cases
just defer to the QQuickFlickable base implementation like minXExtent()
and minYExtent() already do.

Fixes: QTBUG-83890
Pick-to: 6.2 6.4
Change-Id: I7f4060c2f46ae07611bedceca0d322c5f7f6affb
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
QQuickFlickable maxXExtent() and maxYExtent() return the amount of space
that is not shown when inside a ScrollView. QQuickItemView however just
returned width() if vertical and height() if horizontal. In these cases
just defer to the QQuickFlickable base implementation like minXExtent()
and minYExtent() already do.

Fixes: QTBUG-83890
Pick-to: 6.2 6.4
Change-Id: I7f4060c2f46ae07611bedceca0d322c5f7f6affb
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@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>
<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>Item views: fix error when accessing attached view from non-delegates</title>
<updated>2022-06-10T02:32:34+00:00</updated>
<author>
<name>Mitch Curtis</name>
<email>mitch.curtis@qt.io</email>
</author>
<published>2022-06-06T08:02:15+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=dbd108a7997f129004bbed523db75d4aa9d0ab6c'/>
<id>dbd108a7997f129004bbed523db75d4aa9d0ab6c</id>
<content type='text'>
Ensure that the view is set on the relevant attached objects before
QQmlComponent::completeCreate() is called, which would otherwise result
in a TypeError because the view would be set too late.

Fixes: QTBUG-104026
Task-number: QTBUG-98718
Pick-to: 6.2 6.3 6.4
Change-Id: Ic65370bd4534e7452f2377ab4d60a74badf02079
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure that the view is set on the relevant attached objects before
QQmlComponent::completeCreate() is called, which would otherwise result
in a TypeError because the view would be set too late.

Fixes: QTBUG-104026
Task-number: QTBUG-98718
Pick-to: 6.2 6.3 6.4
Change-Id: Ic65370bd4534e7452f2377ab4d60a74badf02079
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid double applyDelegateChange in QQIV::setDelegate</title>
<updated>2022-05-04T20:34:16+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2022-05-03T12:37:26+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=2664b1988f031366c2616581e65b0e02e37e3ff1'/>
<id>2664b1988f031366c2616581e65b0e02e37e3ff1</id>
<content type='text'>
If a QQmlDelegateModel is used together with QQuickItemView, then we
will already call applyDelegateChange when the DelegateModel's
delegateChanged signal is emitted from QQmlDelegateModel::setDelegate.
Calling it manually in QQuickItemView's setDelegate is thus superfluous.

Fixes: QTBUG-102793
Pick-to: 6.2 6.3 5.15
Change-Id: Ifffb23661813c4e71287538ec5342215dfbbdad6
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a QQmlDelegateModel is used together with QQuickItemView, then we
will already call applyDelegateChange when the DelegateModel's
delegateChanged signal is emitted from QQmlDelegateModel::setDelegate.
Calling it manually in QQuickItemView's setDelegate is thus superfluous.

Fixes: QTBUG-102793
Pick-to: 6.2 6.3 5.15
Change-Id: Ifffb23661813c4e71287538ec5342215dfbbdad6
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickListView: Stop overlap for section and firstItem delegates</title>
<updated>2022-01-20T11:19:03+00:00</updated>
<author>
<name>Oliver Eftevaag</name>
<email>oliver.eftevaag@qt.io</email>
</author>
<published>2022-01-07T14:43:59+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=3aad05bc09f40d81df7748cbc246974230a3ca17'/>
<id>3aad05bc09f40d81df7748cbc246974230a3ca17</id>
<content type='text'>
Problem:
The first delegate after a section delegate would have the same position
as the section delegate, if the section delegate is invisible during
initialization.

In case the section delegates become visible later on during program
execution, the delegates would be re-positioned again in the
QQuickListViewPrivate::layoutVisibleItems function.
But this would not call setPosition for the first item (delegate).
It would only call setPosition for all delegates after the first one.
This would mean that the position for the first delegate would never be
updated, after the delegate was first created.

Solution:
Call FxListItemSG::setPosition() for the first item in
QQuickListViewPrivate::layoutVisibleItems, just like we're already doing
for all the items after the first one in the for-loop.

Fixes: QTBUG-94848
Pick-to: 6.3
Change-Id: I34a5ada336ab507b31e3675a1c11eba066fa139a
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
The first delegate after a section delegate would have the same position
as the section delegate, if the section delegate is invisible during
initialization.

In case the section delegates become visible later on during program
execution, the delegates would be re-positioned again in the
QQuickListViewPrivate::layoutVisibleItems function.
But this would not call setPosition for the first item (delegate).
It would only call setPosition for all delegates after the first one.
This would mean that the position for the first delegate would never be
updated, after the delegate was first created.

Solution:
Call FxListItemSG::setPosition() for the first item in
QQuickListViewPrivate::layoutVisibleItems, just like we're already doing
for all the items after the first one in the for-loop.

Fixes: QTBUG-94848
Pick-to: 6.3
Change-Id: I34a5ada336ab507b31e3675a1c11eba066fa139a
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Fix ListView.isCurrentItem when used with DelegateModel"</title>
<updated>2021-11-26T20:23:08+00:00</updated>
<author>
<name>Mitch Curtis</name>
<email>mitch.curtis@qt.io</email>
</author>
<published>2021-11-04T09:41:28+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=5d656b31eb371c9e0bb97c558f9193b08471f1d7'/>
<id>5d656b31eb371c9e0bb97c558f9193b08471f1d7</id>
<content type='text'>
This reverts commit d9f9d773e92940786f159897623618f3bf6bcf0f.

It causes a heap-use-after-free in tst_swipeview.qml.

Task-number: QTBUG-97423
Pick-to: 5.15 6.1 6.2
Change-Id: I42e9831ae1399a010df28c39496a7778121f5e35
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
Reviewed-by: Oliver Eftevaag &lt;oliver.eftevaag@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit d9f9d773e92940786f159897623618f3bf6bcf0f.

It causes a heap-use-after-free in tst_swipeview.qml.

Task-number: QTBUG-97423
Pick-to: 5.15 6.1 6.2
Change-Id: I42e9831ae1399a010df28c39496a7778121f5e35
Reviewed-by: Jan Arve Sæther &lt;jan-arve.saether@qt.io&gt;
Reviewed-by: Oliver Eftevaag &lt;oliver.eftevaag@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Reset currentChanges if currentChanges is active when refilling listView</title>
<updated>2021-11-05T11:30:21+00:00</updated>
<author>
<name>Tony Leinonen</name>
<email>tony.leinonen@qt.io</email>
</author>
<published>2021-10-21T11:44:02+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=2d8033a4ffb9ca60adee29d375491d7ed2a82747'/>
<id>2d8033a4ffb9ca60adee29d375491d7ed2a82747</id>
<content type='text'>
currentIndex was not getting updated because itemViewChangeSet was left
active from previous interaction. Clear the changes if they are still
active on refill.

Task-number: QTBUG-92809
Pick-to: 6.2 5.15
Change-Id: I81558a5e0bfe0f880851fff85370bd5be60a5391
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
currentIndex was not getting updated because itemViewChangeSet was left
active from previous interaction. Clear the changes if they are still
active on refill.

Task-number: QTBUG-92809
Pick-to: 6.2 5.15
Change-Id: I81558a5e0bfe0f880851fff85370bd5be60a5391
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickItemView: avoid leaking of highlights and animators</title>
<updated>2021-10-29T15:49:13+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2021-10-28T14:06:08+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=3193b20570408621d0cf9fa1665397f443d2d4d8'/>
<id>3193b20570408621d0cf9fa1665397f443d2d4d8</id>
<content type='text'>
It's unclear where exactly they leak, but the tst_snippets test in
quickcontrols exposes it. Turning them into unique_ptrs is the clean
solution anyway. They are clearly owned.

Change-Id: I076ea86639b1e0ab3f688eb982b4cee6cb908f6b
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's unclear where exactly they leak, but the tst_snippets test in
quickcontrols exposes it. Turning them into unique_ptrs is the clean
solution anyway. They are clearly owned.

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