Review Request 110625: Make it possible to disable KAbstractFileItemActionPlugins by default
Commit Hook
null at kde.org
Tue May 28 22:05:29 BST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110625/
-----------------------------------------------------------
(Updated May 28, 2013, 9:05 p.m.)
Status
------
This change has been marked as submitted.
Review request for kdelibs.
Description
-------
Currently, all KAbstractFileItemActionPlugins which are installed are embedded into file management-related context menus unless the user explicitly disables them in the settings.
This becomes problematic if the plugin's actions() method executes code that is not guaranteed to return very fast - the user will notice that the host application freezes without even knowing that one of the plugins is the culprit.
In a perfect world, all code executed by plugins would be perfect and the problem would not exist at all. Unfortunately, the world is not perfect, and there are plugins which do things that succeed most of the time, but cause trouble sometimes: https://bugs.kde.org/show_bug.cgi?id=314575
It seems that what Activities is trying to achieve cannot easily be solved using a safer approach which is equally user-friendly for Activities users. On the other hand, I don't think that people who do not use the plugin at all should suffer from the freezes caused by the plugin, so I thought that we could give developers of plugins which execute some "fragile" code the chance to declare that only users who enable the plugin explicitly in the settings should see the plugin's actions in their context menu.
For further information, please see https://bugs.kde.org/show_bug.cgi?id=314575.
Unfortunately, the original author of KAbstractFileItemActionPlugin chose to not add a d-pointer, so I had to use a hack to make it work.
I have patches that make this work:
kactivities (includes another change that fixes a build failure for me): http://paste.kde.org/749834/
kde-baseapps: http://paste.kde.org/749846/
Diffs
-----
kio/kio/kabstractfileitemactionplugin.h 6af7396
kio/kio/kabstractfileitemactionplugin.cpp 07f15f6
Diff: http://git.reviewboard.kde.org/r/110625/diff/
Testing
-------
Deleted kservicemenurc -> Activities not shown in Konqueror/Dolphin context menus, and the plugin is shown as disabled in the settings.
Enabled the plugin in the settings dialog of either Konqueror or Dolphin -> plugin is shown, and disabling it in the dialog hides it again.
Thanks,
Frank Reininghaus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130528/0f3911cc/attachment.htm>
More information about the kde-core-devel
mailing list