Fixes crashes related to closing tabs with splits

Authored by tcanabrava on Sep 16 2018, 5:59 PM.

Description

Fixes crashes related to closing tabs with splits

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.

Reviewers: hindenburg, ngraham, sandsmark

Reviewed By: hindenburg

Subscribers: konsole-devel

Tags: Konsole

Differential Revision: https://phabricator.kde.org/D15379

Details

Committed
hindenburgSep 16 2018, 10:28 PM
Reviewer
hindenburg
Differential Revision
D15379: Fixes crashes related to closing tabs with splits
Parents
R319:8fd74e8b74be: Fix tab attach/reattach and simplify tab dnd code
Branches
Unknown
Tags
Unknown