aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllistmodelworkerscript/data/listmodel_async_sort/ListModelSort.mjs
Commit message (Collapse)AuthorAgeFilesLines
* ListModel: Fix move handling in syncFabian Kosmale2021-02-021-0/+117
When a ListModel is modified in a workerscript, we reconciliate the state in ListModel::sync. However, the logic for moving elements was wrong, causing crashes in endMoveRows due to invalid moves. This patch ensures that elements are moved to the correct position. Notably, whenever an element is moved, we must update the targetIndex of all elements affected by that move. Amends 3accc1dae76575120e71cadb547e961ecd50bcb0. Task-number: QTBUG-85557 Change-Id: I1a1ffa43eab39ed2315f1916527d897b208c2c3b Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> (cherry picked from commit 2996439993c587bc9c7169e4f152169f28247c21) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>