-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
Related code:
KDToolBox/qt/model_view/sortProxyModel/sortproxymodel.cpp
Lines 328 to 343 in f43ed59
| bool ok = beginMoveRows(QModelIndex(), movedRow, movedRow + moveCount - 1, QModelIndex(), destinationRow); | |
| if (!ok) | |
| { | |
| qWarning() << "moveRows from" << movedRow << "up to" << movedRow + moveCount - 1 << "to" | |
| << destinationRow; | |
| QStringList contents; | |
| contents.reserve(rowCount()); | |
| for (int row = 0; row < rowCount(); ++row) | |
| { | |
| contents << index(row).data(m_sortRole).toString(); | |
| } | |
| qWarning() << "moving failed. Current contents:" << contents.join(QLatin1String(", ")); | |
| } | |
| auto rotateEnd = successor(unorderedIt); | |
| std::rotate(it, it + moveCount, rotateEnd); | |
| endMoveRows(); |
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels