D21755: Replace ToolAction by a more universal “ToggleActionMenu”

David Hurka noreply at phabricator.kde.org
Tue Jun 11 22:36:58 BST 2019


davidhurka added a subscriber: VDG.
davidhurka added a comment.


  I suggested to use KActionMenu in D21622 <https://phabricator.kde.org/D21622> (although not really focussed on that patch). Turned out that KActionMenu can not access already constructed toolbar buttons, so that approach is not possible.
  
  Instead, I grabbed my code from D21195 <https://phabricator.kde.org/D21195> and improved it a bit.
  
  Let me know whether this is a realistic UI concept or a special case in Okular.

INLINE COMMENTS

> toggleactionmenu.h:24
> + */
> +class ToggleActionMenu : public KActionMenu
> +{

I get a warning in this line “has virtual methods but non-virtual destructor”. True, the default destructor is not virtual, hiding the virtual destructor of the base class. And yes, Okular crashes at closing.

How do I add a proper destructor whithout breaking the destructor in KActionMenu?

REPOSITORY
  R223 Okular

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

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


More information about the Okular-devel mailing list