[kdesvn] Don't crash on exit

Review Request #126762 - Created Jan. 15, 2016 and submitted

Information
Christian Ehrlicher
kdesvn
master
358032
Reviewers
cgiboudeaux, dfaure

As described in Bug #358032, kdesvn crashes on exit when the bookmarks contain a menu.
The reason is a wrong parent for KBookmarkMenu. It was the KBookmarkManager which is deleted on exit (K_GLOBAL_STATIC). At this time, the kdesvn mainwindow was already destroyed (and the menu entries with it). KBookmarkMenu does not notice this and tries to delete the KMenu (KBookmarkActionMenu) a second time which leads to a crash.
During this fix, I also changed KStandardAction::quit() to only close the kdesvn main window instead directly quitting the application. Now the kdesvn dtor is called every time. See also http://marc.info/?l=kde-core-devel&m=120173497720564&w=2 for a discussion :)

The crash was fully reproducable as soon as there's a folder in the bookmark menu. This crash is gone now. Also now on File->Quit the kdesvn dtor is correctly called.

David Faure
Christian Ehrlicher
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 6a9795325296ca8cfc0f2e9b1fa96b6d9624d7ef by Christian Ehrlicher to branch master.
Loading...