This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/113917/

On December 31st, 2013, 3:58 p.m. UTC, Commit Hook wrote:

This review has been submitted with commit b768749230872b5acf0e2816dd855409f6d70733 by Kevin Funk to branch master.
Re. applying this in frameworks branch:

I suggest reverting the change in katecompletionmodel.cpp as of e6374518f5a966b8badda3a5e90fb873cd7ec08e and then merge master back into frameworks.

- Kevin


On December 31st, 2013, 3:58 p.m. UTC, Kevin Funk wrote:

Review request for Kate and Milian Wolff.
By Kevin Funk.

Updated Dec. 31, 2013, 3:58 p.m.

Bugs: 236948
Repository: kate

Description

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 as soon as 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
FIXED-IN: 4.13

Diffs

  • part/completion/katecompletionwidget.cpp (4bb077e0973fd1eb9f1f5a7bb3e9bccae1a79511)
  • part/completion/katecompletionmodel.cpp (3fa8080ff95deb1e24327063ccd19dbb13ff49a8)
  • part/completion/katecompletionmodel.h (5fedbccc37cd49b7403827dafce15b498e99b160)

View Diff