Set MimeType in desktop file so that Konqueror appears in Default Applications
ClosedPublic

Authored by marten on Mar 9 2020, 3:40 PM.

Details

Summary

The default applications chooser (kcmshell5 componentchooser) queries available web browsers by looking for

'WebBrowser' in Categories and ('x-scheme-handler/http' in ServiceTypes or 'x-scheme-handler/https' in ServiceTypes)

in CfgBrowser::load(KConfig *) in plasma-desktop/kcms/componentchooser/componentchooserbrowser.cpp

This change sets the MimeType in Konqueror's desktop file so that it will be recognised by that query.

Test Plan

Run 'kcmshell5 componentchooser' with the original desktop file installed.
Note that Konqueror does not appear in the combo box for selecting a web browser.

Install the modified desktop file, run 'kbuildsyscoca5' and then 'kcmshell5 componentchooser' again.
Observe that Konqueror is now shown in the web browser combo box, and can be selected and set as the default browser.

Diff Detail

Repository
R226 Konqueror
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
marten requested review of this revision.Mar 9 2020, 3:40 PM
marten created this revision.
marten updated this revision to Diff 77319.Mar 9 2020, 9:01 PM

Needs %U in Exec= line to handle URLs directly and to not download temporary files.

dfaure requested changes to this revision.Mar 11 2020, 1:39 AM

This was supposed to be done by kfmclient_html.desktop instead, so that you don't get a new konqueror process every time you open a URL.
It's just that kfmclient_html.desktop is missing the x-scheme-handler/http[s] mimetypes.

This revision now requires changes to proceed.Mar 11 2020, 1:39 AM
marten updated this revision to Diff 77501.Mar 12 2020, 12:34 PM

Apply the fix to kfmclient_html.desktop as advised.

dfaure accepted this revision.Mar 12 2020, 8:54 PM
This revision is now accepted and ready to land.Mar 12 2020, 8:54 PM
This revision was automatically updated to reflect the committed changes.