D28201: Add KIO::CommandLauncherJob to replace KRun::runCommand

David Edmundson noreply at phabricator.kde.org
Mon Mar 23 15:50:30 GMT 2020


davidedmundson accepted this revision.
davidedmundson added a comment.
This revision is now accepted and ready to land.


  > Maybe the first one should be renamed to ApplicationLauncherJob, now that I found out it wouldn't be a good place for running commands (the setters are too different).
  
  Probably.

INLINE COMMENTS

> commandlauncherjob.cpp:63
> +
> +void KIO::CommandLauncherJob::setIcon(const QString &iconName)
> +{

Can we have a setDesktopName() as an additional shortcut for icon + executable

It will also help the heuristic KProcessRunner is doing:

  KService::Ptr service = KService::serviceByDesktopName(bin);

which won't work now kompare is probably with the ID org.kde.kompare

> commandlauncherjob.h:39
> + * The job finishes when the application is successfully started. At that point you can
> + * query the PID(s).
> + *

PID without (s)

> commandlauncherjob.h:98
> +     * @return the PID of the application that was started.
> +     * Convenience method for pids().at(0). You should only use this when specifying zero or one URL,
> +     * or when you are sure that the application supports opening multiple files. Otherwise use pids().

this is copy pasted

REPOSITORY
  R241 KIO

BRANCH
  2020_03_commandlauncherjob

REVISION DETAIL
  https://phabricator.kde.org/D28201

To: dfaure, apol, davidedmundson, nicolasfella, vkrause, broulik
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200323/2bcd278d/attachment.html>


More information about the Kde-frameworks-devel mailing list