Try to make sure that renaming inline does not cause crashes

Review Request #111988 - Created Aug. 10, 2013 and submitted

Information
Frank Reininghaus
kde-baseapps
KDE/4.11
322969
Reviewers
dolphin
We had some trouble with inline renaming some time ago, which is mostly resolved now. However, there recently was a crash report which looks related to inline renaming.

Like in some of the earlier crashes, it seems that the editor is deleted during a nested event loop that is run inside its mouseMoveEvent method. I could imagine that this can happen if, for example, the edited file is deleted (or removed from the view in some other way) in this event loop (there might be possibilities). In that case, the destructor of the widget will delete the editor.

I think we should delete the editor in this destructor with deleteLater(). My patch always defers the deletion of the editor until the latest possible moment (at least the lastest possible moment which is accessible from KStandardItemListWidget). I hope that this resolves the problem.
Renaming still works OK. Tried some of the things that caused trouble in the past (dragging text to the Places Panel, clicking "Speak Text" in the context menu, keyboard focus handling). Everything seems to work fine.
Emmanuel Pescosta
Commit Hook
Frank Reininghaus
Review request changed

Status: Closed (submitted)

Loading...