Fix crash when closing dock widgets from within the widget
ClosedPublic

Authored by croick on Sep 23 2017, 12:05 AM.

Details

Summary
  • context menu was owned by widget that is to be deleted

BUG: 384828, 384977

Test Plan
  • close dock widget by context menu from widget title -> no longer crashes

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
croick created this revision.Sep 23 2017, 12:05 AM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptSep 23 2017, 12:05 AM
apol accepted this revision.Sep 23 2017, 12:15 AM
This revision is now accepted and ready to land.Sep 23 2017, 12:15 AM
croick edited the summary of this revision. (Show Details)Sep 23 2017, 7:58 AM
This revision was automatically updated to reflect the committed changes.

@kossebau You just added this parent -- do you think this is the correct fix?

In any case, this fix should've probably gone to 5.2 branch(?)

In D7947#148654, @kfunk wrote:

@kossebau You just added this parent -- do you think this is the correct fix?

Hmpf... and I thought I had tested all menus after that other crash i introduced with those QMenu-on-Wayland support fixes.

A proper fix would be needed in Qt, to separate memory management and visual relationship. Until that exists, reverting my parent addition should be fine for now. There aren't yet many people if any running KDevelop on Wayland (and this was just a blind fix done following guides).

In any case, this fix should've probably gone to 5.2 branch(?)

Very possibly yes.

kfunk added a comment.Sep 24 2017, 9:54 PM
In D7947#148654, @kfunk wrote:

@kossebau You just added this parent -- do you think this is the correct fix?

Hmpf... and I thought I had tested all menus after that other crash i introduced with those QMenu-on-Wayland support fixes.

A proper fix would be needed in Qt, to separate memory management and visual relationship. Until that exists, reverting my parent addition should be fine for now. There aren't yet many people if any running KDevelop on Wayland (and this was just a blind fix done following guides).

In any case, this fix should've probably gone to 5.2 branch(?)

Very possibly yes.

Done, thanks!