Review Request 120012: kde-cli-tools: Save the default application into the group [Default Applications]

Luc Menut lmenut at
Sun Aug 31 10:08:08 UTC 2014

This is an automatically generated e-mail. To reply, visit:

(Updated août 31, 2014, 10:08 matin)

Review request for KDE Frameworks and David Faure.

Summary (updated)

kde-cli-tools: Save the default application into the group [Default Applications]

Repository: kde-cli-tools


Save the default application for a given mimetype by writing into the group [Default Applications] in the file mimeapps.list, according to mime-apps-spec 1.0 .

Currently, the default application saved by KDE (first application in [Added Assocations] ) is not respected by applications using glib/gio (which follow mime-apps-spec 1.0) if there is a default application at a lower level (eg $XDG_DATA_DIRS/applications/mimeapps.list), because the most-preferred .desktop from [Added Assocations] for a given mimetype is used to determine the default application only if there is no entry in [Default Applications] for this mimetype at all levels.
mime-apps-spec 1.0#default
"... In the absence of such an entry, the next mimeapps.list is checked. Once all levels have been checked, if no entry could be found, the implementations should pick the most-preferred .desktop files associated with the mimetype, taking into account added and removed associations as per the next section."

eg. if we have
- ~/.local/share/applications/mimeapps.list (with no group [Default Applications] )
[Added Assocations]

- /usr/share/applications/mimeapps.list (from distrib preferences)
[Default Applications]

according to mime-apps-spec 1.0, the default application used for mimetype1 will be foo3.desktop instead of foo1.desktop expected by a KDE user.

The proposed patch fixes this.

Luc Menut - Mageia

PS: I don't have write access to kde git, so could you commit the change if the patch looks fine. Thanks.


  keditfiletype/mimetypedata.h 5b00c07 
  keditfiletype/mimetypedata.cpp 65af59c 



tested with kde-cli-tools 5.0.1 (Mageia Cauldron)


Luc Menut

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Kde-frameworks-devel mailing list