Fix assert in ClassModel::nodesRemoved
ClosedPublic

Authored by buschinski on Aug 13 2018, 1:38 PM.

Details

Reviewers
brauch
Group Reviewers
KDevelop
Summary

This Patch fixes https://bugs.kde.org/show_bug.cgi?id=396347 .
Previously "nodesRemoved" included the begin&end notification for removing rows, without removing any in between.
The patch changes the logic to correctly announce the begin before removing rows and the end after the rows have been removed.

Test Plan
  • build Qt 5.11.1 with debug&assert enabled
  • recompile kdevelop against this version of Qt
  • start kdevelop
  • open the Classes Toolview
  • close kdevelop

-> crash/assert

Diff Detail

Repository
R32 KDevelop
Lint
Lint Skipped
Unit
Unit Tests Skipped
buschinski created this revision.Aug 13 2018, 1:38 PM
Restricted Application added a project: KDevelop. · View Herald TranscriptAug 13 2018, 1:38 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald Transcript
buschinski requested review of this revision.Aug 13 2018, 1:38 PM
buschinski added a reviewer: KDevelop.
brauch accepted this revision.Aug 13 2018, 1:40 PM
brauch added a subscriber: brauch.

Good find, the previous code (remove item -> call beginRemoveRows() -> call endRemoveRows()) definitely looks wrong. Can you submit this yourself?
Otherwise, I'd need an email address to set as the commit author.

Thanks!

This revision is now accepted and ready to land.Aug 13 2018, 1:40 PM
brauch closed this revision.Aug 13 2018, 1:49 PM

Submitted with f30ef7c6f1376 to 5.2, sorry, I forgot to set the diff in the commit message.