<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/quick/items/qquickitemview.cpp, branch 5.11</title>
<subtitle>Qt Declarative (Quick 2)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/'/>
<entry>
<title>use nullptr consistently (clang-tidy)</title>
<updated>2018-02-26T07:13:18+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2018-02-21T09:41:54+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=499ec43937e926e4f2fa57a9baa455fcb3862262'/>
<id>499ec43937e926e4f2fa57a9baa455fcb3862262</id>
<content type='text'>
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.

Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).

Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann &lt;simon.hausmann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.

Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).

Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann &lt;simon.hausmann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickItemView::currentItemChanged called upon currentItem destruction</title>
<updated>2018-02-13T10:03:53+00:00</updated>
<author>
<name>Aleix Pol</name>
<email>aleixpol@kde.org</email>
</author>
<published>2018-01-19T16:32:00+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=0e64bd96fbf26855a65e38847083dbd2c6bee4ac'/>
<id>0e64bd96fbf26855a65e38847083dbd2c6bee4ac</id>
<content type='text'>
There were some cases where the signal wasn't emitted and we ended up
with events being delivered to objects that didn't exist anymore.

Task-number: QTBUG-65881
Change-Id: I847669a978e82a0332907b029a8295bb993d2850
Reviewed-by: Frederik Gladhorn &lt;frederik.gladhorn@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There were some cases where the signal wasn't emitted and we ended up
with events being delivered to objects that didn't exist anymore.

Task-number: QTBUG-65881
Change-Id: I847669a978e82a0332907b029a8295bb993d2850
Reviewed-by: Frederik Gladhorn &lt;frederik.gladhorn@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix transition when removing the last item from ListView/GridView</title>
<updated>2018-02-02T07:15:13+00:00</updated>
<author>
<name>Kari Hautamäki</name>
<email>kari.hautamaki@qt.io</email>
</author>
<published>2018-01-15T15:01:19+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=23ea4cf5a3babd73a4d398410e2a21685245e0a0'/>
<id>23ea4cf5a3babd73a4d398410e2a21685245e0a0</id>
<content type='text'>
Use the previous item view boundaries (before a remove was applied)
when defining transition properties.

Task-number: QTBUG-64311
Change-Id: I66870a7267ac26ea430c364383f32fd5c47d4a5d
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the previous item view boundaries (before a remove was applied)
when defining transition properties.

Task-number: QTBUG-64311
Change-Id: I66870a7267ac26ea430c364383f32fd5c47d4a5d
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickItemView: Clear pending changes when refilling</title>
<updated>2017-12-18T09:25:20+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2017-12-13T11:17:14+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=e8570bd1af74724b6fae1ac8a2d8bbdfee7a6504'/>
<id>e8570bd1af74724b6fae1ac8a2d8bbdfee7a6504</id>
<content type='text'>
Generally the bufferedChanges are an "extension" of the currentChanges,
which can just not be applied at the moment because we are in a layout
phase. If we regenerate or clear the whole view in the mean time, the
bufferedChanges become just as invalid as the currentChanges.

On top of that, refilling can trigger further changes, part of which
will be applied during the refilling. As that leaves us in an
inconsistent state, we need to loop the refilling until no further
changes are generated. As the changes might affect items that are
already visible, and therefore not subject to refilling, we need to
clear all the items before refilling in this case.

In QTBUG-46488 things are added in the onCompleted callback of the
delegates (by expanding the tree view, which translates into adding
rows to the list view). Depending on where you add the new items, the
list view might pick them up when iterating the model on refill() or
it might create delegates for the same model entry twice. So, if that
happens we need to discard the result and refill again.

Task-number: QTBUG-46488
Change-Id: Ie4e0a731f7feda6aa962b6cb9a6cd5c3bf90486e
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generally the bufferedChanges are an "extension" of the currentChanges,
which can just not be applied at the moment because we are in a layout
phase. If we regenerate or clear the whole view in the mean time, the
bufferedChanges become just as invalid as the currentChanges.

On top of that, refilling can trigger further changes, part of which
will be applied during the refilling. As that leaves us in an
inconsistent state, we need to loop the refilling until no further
changes are generated. As the changes might affect items that are
already visible, and therefore not subject to refilling, we need to
clear all the items before refilling in this case.

In QTBUG-46488 things are added in the onCompleted callback of the
delegates (by expanding the tree view, which translates into adding
rows to the list view). Depending on where you add the new items, the
list view might pick them up when iterating the model on refill() or
it might create delegates for the same model entry twice. So, if that
happens we need to discard the result and refill again.

Task-number: QTBUG-46488
Change-Id: Ie4e0a731f7feda6aa962b6cb9a6cd5c3bf90486e
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQmlDelegateModel: add incubationStatus(), and use it to determine 'requestedIndex'</title>
<updated>2017-11-30T07:36:05+00:00</updated>
<author>
<name>Richard Moe Gustavsen</name>
<email>richard.gustavsen@qt.io</email>
</author>
<published>2017-11-08T10:01:35+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=816b5a667f0b5b47c3f80c2c775535310c89b727'/>
<id>816b5a667f0b5b47c3f80c2c775535310c89b727</id>
<content type='text'>
We used to assign the currently incubating item to 'requestedIndex' based
on requested incubation mode alone. This is not sufficient, as the item
can also be loaded async when the mode is AsyncIfNested. To check if the
item is really loading async (and that we're not getting nullptr because
of some other failure), we need to ask the incubator.

Task-number: QTBUG-61537
Change-Id: Id1f458db4a7584a6b58d5bad0e7832ce4fc341dc
Reviewed-by: J-P Nurmi &lt;jpnurmi@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We used to assign the currently incubating item to 'requestedIndex' based
on requested incubation mode alone. This is not sufficient, as the item
can also be loaded async when the mode is AsyncIfNested. To check if the
item is really loading async (and that we're not getting nullptr because
of some other failure), we need to ask the incubator.

Task-number: QTBUG-61537
Change-Id: Id1f458db4a7584a6b58d5bad0e7832ce4fc341dc
Reviewed-by: J-P Nurmi &lt;jpnurmi@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQmlIntanceModel: use QQmlIncubator::IncubationMode instead of bool to specify incubation mode</title>
<updated>2017-11-30T07:35:35+00:00</updated>
<author>
<name>Richard Moe Gustavsen</name>
<email>richard.gustavsen@qt.io</email>
</author>
<published>2017-11-06T15:13:13+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=60d589ccddb036e84883a6c2ef63a5292c8ad022'/>
<id>60d589ccddb036e84883a6c2ef63a5292c8ad022</id>
<content type='text'>
The current implementation would pass a boolean to signal if asynchronous
or synchronous incubation should be used to create an item. The problem with this approach
is that passing 'synchronous" would translate to QQmlIncubation::AsynchronousIfNested
later down the chain. This meant that even if the caller requested synchronous incubation, it
could end up with asynchronous incubation anyway, e.g if an async parent incubator was active at
the time of the call. And this can easily come as an unhandled supprise for the caller, and as
such, cause unforseen bugs.

This patch is a first of a set of patches that is done to fix the bug reported in the task below.
It will not change any behavior, it is written to preserve the logic exactly as it were, just
as a preparation for subsequent patches. It makes it explicit at the call location what
incubation mode will be used, and especially make it clear whenever the AsynchronousIfNested
flag is in play.

Task-number: QTBUG-61537
Change-Id: I8b3ba5438ebb2cd59983a098bd8ceeeb844da87b
Reviewed-by: J-P Nurmi &lt;jpnurmi@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current implementation would pass a boolean to signal if asynchronous
or synchronous incubation should be used to create an item. The problem with this approach
is that passing 'synchronous" would translate to QQmlIncubation::AsynchronousIfNested
later down the chain. This meant that even if the caller requested synchronous incubation, it
could end up with asynchronous incubation anyway, e.g if an async parent incubator was active at
the time of the call. And this can easily come as an unhandled supprise for the caller, and as
such, cause unforseen bugs.

This patch is a first of a set of patches that is done to fix the bug reported in the task below.
It will not change any behavior, it is written to preserve the logic exactly as it were, just
as a preparation for subsequent patches. It makes it explicit at the call location what
incubation mode will be used, and especially make it clear whenever the AsynchronousIfNested
flag is in play.

Task-number: QTBUG-61537
Change-Id: I8b3ba5438ebb2cd59983a098bd8ceeeb844da87b
Reviewed-by: J-P Nurmi &lt;jpnurmi@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix ListView::positionViewAtIndex with ListView.Contain mode</title>
<updated>2017-11-07T12:21:11+00:00</updated>
<author>
<name>Joni Poikelin</name>
<email>joni.poikelin@qt.io</email>
</author>
<published>2017-10-23T10:51:43+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=54f15f5df5cf545bf4d675ccbafecd482b4a2b0b'/>
<id>54f15f5df5cf545bf4d675ccbafecd482b4a2b0b</id>
<content type='text'>
Sticky headers and footers weren't accounted for when calculating new
view position causing the requested item to be left behind them.

Task-number: QTBUG-63974
Change-Id: Id69579643a942e8558960b2c8b0fee980fa86947
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sticky headers and footers weren't accounted for when calculating new
view position causing the requested item to be left behind them.

Task-number: QTBUG-63974
Change-Id: Id69579643a942e8558960b2c8b0fee980fa86947
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix providing correct velocity when using index based scrolling</title>
<updated>2017-11-03T11:12:56+00:00</updated>
<author>
<name>Pasi Petäjäjärvi</name>
<email>pasi.petajajarvi@qt.io</email>
</author>
<published>2017-10-20T08:09:22+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=0f043c594b559f2f936333c8cf9779283a480c7d'/>
<id>0f043c594b559f2f936333c8cf9779283a480c7d</id>
<content type='text'>
Index based scrolling does not enable moving and flicking properties.

Task-number: QTBUG-34576
Change-Id: Ief06d37115ca389027670c97ce6c0457a74d4872
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Index based scrolling does not enable moving and flicking properties.

Task-number: QTBUG-34576
Change-Id: Ief06d37115ca389027670c97ce6c0457a74d4872
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQuickItemView: always honor the removeDisplaced animation</title>
<updated>2017-11-03T08:27:36+00:00</updated>
<author>
<name>Alberto Mardegan</name>
<email>mardy@users.sourceforge.net</email>
</author>
<published>2016-11-21T19:41:33+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=62b1bc426929c5f990f00bee7d3de8a0024ed7c5'/>
<id>62b1bc426929c5f990f00bee7d3de8a0024ed7c5</id>
<content type='text'>
The animation was not being performed if the delayRemove attached
property was changed by the handler of the remove() attached signal.
We need to run the delayed transitions not only if we have an animation
for the target item, but also if we have an animation for the items
being displaced.
(The flag variables can safely be obtained outside of the for loop,
given that their value should not change during the loop iteration)

Task-number: QTBUG-57225
Change-Id: I8c138677d7dcdf63e0932ec5cf7738c0caeb2ab8
Reviewed-by: J-P Nurmi &lt;jpnurmi@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>
The animation was not being performed if the delayRemove attached
property was changed by the handler of the remove() attached signal.
We need to run the delayed transitions not only if we have an animation
for the target item, but also if we have an animation for the items
being displaced.
(The flag variables can safely be obtained outside of the for loop,
given that their value should not change during the loop iteration)

Task-number: QTBUG-57225
Change-Id: I8c138677d7dcdf63e0932ec5cf7738c0caeb2ab8
Reviewed-by: J-P Nurmi &lt;jpnurmi@qt.io&gt;
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ListView: don't stop moving the highlight because of model updates</title>
<updated>2017-11-03T08:27:29+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2017-11-01T12:03:22+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=a7880a0c92323ccb2f297a39a993a87e20d65e9c'/>
<id>a7880a0c92323ccb2f297a39a993a87e20d65e9c</id>
<content type='text'>
In QQuickItemViewPrivate::applyModelChanges(), if
moveReason = QQuickItemViewPrivate::Other,
then QQuickItemView::trackedPositionChanged() will fail to call
d-&gt;setPosition(pos), which is normally what keeps the Flickable
moving for a while.  Leave the reason as-is (it will be SetIndex in
this case), so as not to forget that we were actually trying to move
down.  Updating the model was just a side-effect of that: either
because some QML code was trying to append to the model or because
fetchMore() was called.

Task-number: QTBUG-61269
Task-number: QTBUG-62864
Change-Id: I3fd402469950d6c12e6a8d6e42be83ea4f54776a
Reviewed-by: J-P Nurmi &lt;jpnurmi@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In QQuickItemViewPrivate::applyModelChanges(), if
moveReason = QQuickItemViewPrivate::Other,
then QQuickItemView::trackedPositionChanged() will fail to call
d-&gt;setPosition(pos), which is normally what keeps the Flickable
moving for a while.  Leave the reason as-is (it will be SetIndex in
this case), so as not to forget that we were actually trying to move
down.  Updating the model was just a side-effect of that: either
because some QML code was trying to append to the model or because
fetchMore() was called.

Task-number: QTBUG-61269
Task-number: QTBUG-62864
Change-Id: I3fd402469950d6c12e6a8d6e42be83ea4f54776a
Reviewed-by: J-P Nurmi &lt;jpnurmi@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
