Revision dd1b2b4...

Go back to digest for 22nd June 2014

Bug Fixes in KDE Base

Aurélien Gâteau committed changes in [konsole/frameworks] /:

Fix crash on close

Move code responsible for 'forgetting' a view outside of code responding to the
TerminalDisplay deletion.

This avoids a loop like this:

=> ~QStackedWidget
=> ~TerminalDisplay
=> QObject::destroyed
=> ViewContainer::viewDestroyed
=> ViewContainer::removeViewWidget
- internal cleanup
- try to remove TerminalDisplay from QStackedWidget which is being deleted and

Instead the code now does:

=> ~QStackedWidget
=> ~TerminalDisplay
=> QObject::destroyed
=> ViewContainer::viewDestroyed
=> ViewContainer::forgetView (does the internal clean up)

And if one tries to explicitly remove a view, sequence is:

=> ViewContainer::forgetView
=> ViewContainer::removeViewWidget

The patch also removes ViewManager::focusActiveView() because it causes a crash
when closing a TerminalDisplay as it tries to put the focus on the deleted
TerminalDisplay. I initially called it through a queued connection, but realized
it is actually not needed for focus to be passed to the correct view, so just
removed it.

REVIEW: 118839

File Changes

Modified 5 files
  •   src/ViewContainer.cpp
  •   src/ViewContainer.h
  •   src/ViewManager.cpp
  •   src/ViewManager.h
  •   src/ViewSplitter.cpp
5 files changed in total