DolphinPart: port dolphin's last use of KRun::run to CommandLauncherJob.
ClosedPublic

Authored by dfaure on Apr 13 2020, 10:14 PM.

Details

Summary

I chose CommandLauncherJob rather than ApplicationLauncherJob
because that would require either looking up org.kde.kfind.desktop
(with a risk of failure) or duplicating the icon name...

Test Plan

commented out the if() block of the slot, to make sure we end
up launching kfind with this code. Then konqueror /, and Ctrl+F.

Diff Detail

Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 25184
Build 25202: arc lint + arc unit
dfaure requested review of this revision.Apr 13 2020, 10:14 PM
dfaure created this revision.
broulik accepted this revision.Apr 14 2020, 7:17 AM

that would require either looking up org.kde.kfind.desktop (with a risk of failure) or duplicating the icon name

I don't understand?

This revision is now accepted and ready to land.Apr 14 2020, 7:17 AM

that would require either looking up org.kde.kfind.desktop (with a risk of failure) or duplicating the icon name

I don't understand?

I'm thinking of a half-correct setup in a non-plasma environment. Someone manually installs dolphin and kfind in gnome, starts them both from the terminal, only sets $PATH, but not e.g. $XDG_DATA_DIRS... So kfind is in the PATH, but the desktop file isn't actually visible.
Yes this is far-fetched and a bad setup, but the requirement is just higher if the desktop file is supposed to be available.

Or actually we can think of MS Windows, where finding an executable is easy, finding an installed desktop file is a lot more trouble.

This makes me want to always use CommandLauncherJob for launching another application by name....
(and leave ApplicationLauncherJob for the case where KRun - or in the future OpenUrlJob - finds the applications based on a mimetype, since for that a desktop file must for sure be available).

Let's keep the simple case simple?

dfaure closed this revision.Apr 18 2020, 11:07 AM