Fix assert in ~QPersistentModelIndex
KateCompletionWidget may call QAIM::setCurrentIndex during a reset of the model, inside KateCompletionWidget::modelContentChanged(). At this point, model indices are invalid, but QAIM wasn't informed about it. The main problem is that KateCompletionModel doesn't use the (relatively) new {begin,end}ResetModel blocks to make persistent model indices invalid when we start resetting the model. Instead reset() is used *after* we have reset the model. However, KateCompletionModel may emit contentGeometryChanged too early (before a reset()) and hence triggering QAIM::setCurrentIndex while QAIM is still referencing now invalid persistent model indices. Other changes: Remove contentGeometryChanged. Instead, use layoutChanged() and modelReset() signals to react to model changes. This also ports KateCompletionModel away from deprecated QAIM methods such as QAIM::reset() BUG: 236948 REVIEW: 113917 FIXED-IN: 4.13
parent
af46836d
Please register or sign in to comment