Review Request 129587: Set parent for actions in DropJob's popup menu

Elvis Angelaccio elvis.angelaccio at kde.org
Tue Dec 13 18:35:35 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129587/
-----------------------------------------------------------

(Updated Dec. 13, 2016, 7:35 p.m.)


Status
------

This change has been marked as submitted.


Review request for KDE Frameworks and David Faure.


Changes
-------

Submitted with commit 82b5a99998dd5f3dbcca6815ef32c39255c86898 by Elvis Angelaccio to branch master.


Repository: kio


Description
-------

KAbstractFileItemActionPlugin::actions() has a `parentWidget` argument that plugins can use as parent for the actions. DndPopupMenuPlugin::setup() doesn't have a similar argument, so there can be memory leaks. This patch sets the popup menu as parent so that plugins don't have to care about this.

The alternative is to deprecate the current setup() method in favor of a new one (maybe called actions() for consistency?) which also takes an additional `QWidget*` as argument.


Diffs
-----

  src/widgets/dndpopupmenuplugin.h 264fbdf42c410d39561ddaca62e4eef9777aba85 
  src/widgets/dropjob.cpp 1febd3397ec8e993a9786547da9c381a0f57a1f8 

Diff: https://git.reviewboard.kde.org/r/129587/diff/


Testing
-------

Ensured the actions are actually deleted by connecting a lambda to their `destroyed` signals.


Thanks,

Elvis Angelaccio

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20161213/d8b9c44a/attachment.html>


More information about the Kde-frameworks-devel mailing list