KDToolBox
KDToolBox copied to clipboard
SortProxyModel: endMoveRows() will be called even if beginMoveRows() return false
Related code:
https://github.com/KDABLabs/KDToolBox/blob/f43ed5916f3f0c8e27388e27e130a68cc9d10b49/qt/model_view/sortProxyModel/sortproxymodel.cpp#L328-L343
The issue may occur when we attempt to call reorder() when reorder() is already running, which might lead to a crash.
Note: I'm using a modified version of the SortProxyModel which also handle modelReset() in order to support QML. I originally converted it to resetInternalData() + handleDataChanged() which caused the issue I got. I'm not exactly sure (haven't verified) if this issue can be triggered in unmodified version of SortProxyModel, so I'm just opening an issue here just in case.