D15379: Fixes crashes related to closing tabs with splits

Tomaz Canabrava noreply at phabricator.kde.org
Sun Sep 9 17:01:45 BST 2018


tcanabrava created this revision.
Herald added a project: Konsole.
Herald added a subscriber: konsole-devel.
tcanabrava requested review of this revision.

REVISION 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.

REPOSITORY
  R319 Konsole

BRANCH
  fixCloseTabSplitter

REVISION DETAIL
  https://phabricator.kde.org/D15379

AFFECTED FILES
  src/ViewContainer.cpp
  src/ViewManager.cpp
  src/ViewSplitter.cpp
  src/ViewSplitter.h

To: tcanabrava
Cc: konsole-devel, herrold, ngraham, maximilianocuria, hindenburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20180909/184fc9e8/attachment.html>


More information about the konsole-devel mailing list