Moving code for "Open With" and ServiceMenu actions to kdelibs

David Faure faure at
Tue Mar 17 20:03:03 GMT 2009

The code for handling "open with" action/submenus and servicemenus (RMB / Actions / ...)
is currently in libkonq (and used by dolphin and konqueror), but I have received a number
of requests for moving that code up to kdelibs.
It is already used by the plasma "Locations" runner AFAIK, which won't have to link to libkonq
anymore, and at least "Open With <default file manager>" will be used in KFileDialog,
and I'm sure there are more potential users of "open with" and servicemenus.

The attached patch adds two classes to kdelibs:
* KFileItemListProperties (which stores common properties for a list of items,
 and determines which capabilities are available, like all-readable, all-writable, etc.). Unittest included.
* KFileItemActions - the class which implements "Open with" and servicemenu actions.

The first one belongs obviously to kio (could even have been part of KFileItemList
if had a d pointer... that's for kde5); I wasn't exactly sure about the second one,
could have been for libkfile too. OTOH the goal of this move is do generalize
the use of those actions outside of file managers, so libkio is probably better.

Thanks for reviewing the patch (especially the API, which I already cleaned up
compared to what was in libkonq).

Of course I also ported the libkonq classes to those new classes (can't remove
them, for BC reasons, but they are now mere wrappers).

David Faure, faure at, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (, and KOffice (
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kfileitemactions.diff
Type: text/x-patch
Size: 44024 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list