D21755: [RFC] Replace ToolAction by a more universal “ToggleActionMenu”

David Hurka noreply at phabricator.kde.org
Sat Jun 22 21:27:47 BST 2019


davidhurka marked 2 inline comments as done.
davidhurka added inline comments.

INLINE COMMENTS

> davidhurka wrote in toggleactionmenu.cpp:63
> 1. ~PageView() calls ~ToggleActionMenu(), because it’s a child.
> 2. ~WidgetAction() (probably called trough some XMLGui stuff) calls ~QToolButton to delete the toolbar buttons.
> 3. ~QToolButton() emits destroyed(), which triggers the ToggleActionMenu, //although// this was already destroyed.
> 4. forgetButton() accesses deallocated space (`this->m_buttons`), possibly causing a segfault.
> 
> My only idea why ~QObject() fails to disconnect ToggleActionMenu:
> It all happens in another destructor (but not in a base class destructor; in that case this behaviour would be officially documented).

This problem does not disappear after I have replaced the parent pointer QWidget* by QObject*. Meh...
So QPointer will stay.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D21755

To: davidhurka, #okular
Cc: simgunz, aacid, #vdg, okular-devel, fbampaloukas, joaonetto, tfella, ngraham, darcyshen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20190622/c9d44ee4/attachment.html>


More information about the Okular-devel mailing list