D6625: Fix crash on view split action invoked from tabbar context menu

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Tue Jul 11 11:14:25 UTC 2017

kossebau added a comment.

  The QPointer definitely is not needed here, was just result of initial approach to deal with the deletion of the QMenu.
  Actually the QMenu object could also be put back onto the stack, where it was initially and where it also is in some places of similar code across KDevelop codebase.
  Did not change that yet to make patch more simple (no "->" to "." lines). And chose QScopedPointer instead of raw pointer rather randomly.
  Ideally all such places should be aligned to what is considered best practice (which is what? heap or stack for QMenus?).
  The crash was due to QMenu::exec() still being executed (and going to access class members) when the QMenu object was prematurely deleted due to sync handling of the split view actions which resulted in deletion of the parent widget set to the QMenu instance.

  R33 KDevPlatform


To: kossebau, #kdevelop
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170711/e789a497/attachment.html>

More information about the KDevelop-devel mailing list