Fixes crashes related to closing tabs with splits
ClosedPublic

Authored by tcanabrava on Sep 9 2018, 4:01 PM.

Details

Summary

If you moved the tabs to splits in a way that you have a different
number of tabs in each split, and started closing it, the count()
of the tabs would be different and we would hit an assert.

The fix is simple: don't separate the logic between tabEmpty and
tabDestroyed, if the tab is empty it will be destroyed but we can
treat everything in the tabEmpty signal, this way we will never hit
a dangling pointer.

Because of that it was possible that a splitView had a invalid
activeWidget for a microsecond, when it's deleting itself, so
instead of asserting if we have no active view, I choose to return
a empty list of properties.

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
tcanabrava created this revision.Sep 9 2018, 4:01 PM
Restricted Application added a project: Konsole. · View Herald TranscriptSep 9 2018, 4:01 PM
Restricted Application added a subscriber: konsole-devel. · View Herald Transcript
tcanabrava requested review of this revision.Sep 9 2018, 4:01 PM
hindenburg accepted this revision.Sep 16 2018, 10:27 PM
This revision is now accepted and ready to land.Sep 16 2018, 10:27 PM
This revision was automatically updated to reflect the committed changes.