[PATCH] Fix selecting binaries from component chooser KCM
authorDavid Edmundson <kde@davidedmundson.co.uk>
Wed, 14 Jul 2021 16:06:59 +0000 (17:06 +0100)
committerNorbert Preining <norbert@preining.info>
Thu, 15 Jul 2021 01:20:01 +0000 (02:20 +0100)
commitf0cae31903ec1d0bae299f1cb47e8bb380de646d
treebc1fb16d49bace6436d0d2c0a5ac1ec5953c7afc
parente81dad37376ad15f219368869b52bc8d2a0b9047
[PATCH] Fix selecting binaries from component chooser KCM

In the kcmshell for a component chooser we use the open with dialog to
select services for various scheme handlers.

If you select a binary instead of a .desktop file a temporary .desktop
file is created in ~/.local/share/applications

This is in the format
Exec=someBinary
MimeType=x-scheme-handler/http

When we then use this application for launching KIO::DesktopExecParser
then (sort of correctly) determines that that the chosen service cannot
handle the http scheme because even though it is a scheme handler it
does not have a "%u" in the exec line.

This leads to us potentially loading websites via kioclient or kio-fuse.

Testing done:
 - kcmshell5 component chooser
 - web browser -> other -> type "/usr/bin/firefox"
 - kde-open5 http://kde.org
 - Previously this gave a local URL, now it is correct

Gbp-Pq: Name upstream-8ad69215-fix-selecting-binaries-from-components.patch
src/widgets/kopenwithdialog.cpp