aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/quicktest.cpp
diff options
context:
space:
mode:
authorJan Arve Sæther <jan-arve.saether@qt.io>2021-03-09 10:13:57 +0100
committerJan Arve Sæther <jan-arve.saether@qt.io>2021-03-30 10:23:59 +0000
commitea1681cf2ac36450778552567201662ff1a39ffe (patch)
tree2afe62e6d68cf7e8f1caa1cce248b8ee2f7843ce /src/qmltest/quicktest.cpp
parent36ae81c73f3592f8ebc73a301cf29bf91d076391 (diff)
DelegateModelGroup: Fix bug where item could be removed from the model
If an item was removed from the DelegateModelGroup before it was completed it caused subsequent items in the model to be missing in some cases. The reason was that while populating the ListView, it iterated with an index for each item to call createItem() on. However, createItem() might call onCompleted (which in the case of QTBUG-86708 removed the item from the DelegateModel), which caused the next index we called createItem() with to be wrong (it became one step ahead). We therefore add a helper class MutableModelIterator, which keeps track of if a index in the model got removed (and if the iterator index needs to be adjusted because of that).... Task-number: QTBUG-86708 Change-Id: I33537b43727aed4f2b9bdda794b011b6684c44b4 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 0ff9db566c48172c688bf9327fe6a781dc4a1c34) Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/qmltest/quicktest.cpp')
0 files changed, 0 insertions, 0 deletions