Details
-
Bug
-
Resolution: Invalid
-
P5: Not important
-
None
-
5.11.1
-
None
Description
QListModel::move passes dstRow to beginMoveRows but the documentation states: "However, when moving rows down in the same parent (sourceParent and destinationParent are equal), the rows will be placed before the destinationChild index. That is, if you wish to move rows 0 and 1 so they will become rows 1 and 2, destinationChild should be 3. In this case, the new index for the source row i (which is between sourceFirst and sourceLast) is equal to (destinationChild-sourceLast-1+i)."
dstRow+1 should be passed instead
It's the same mistake I made in https://codereview.qt-project.org/237364/