Port services and shell runner away from KRun
ClosedPublic

Authored by broulik on Mar 27 2020, 2:05 PM.

Details

Summary

Use ApplicationLauncherJob and CommandLauncherJob.
Also, for services runner pass a KServiceAction to the job so it invokes the appropriate jump list action

Test Plan

Depends on D28295

  • Running normal programs still works
  • Invoking jump list action entries still works
  • Running programs with spaces in their desktop file (checking if that QUrl breaks some encoding) still works
  • Running shell commands still works
  • Running shell commands in terminal (unchanged) still works
  • When program fails to launch, I now get a nice plasma notification

Makes me wonder if we should do the notifyAccessed stuff in the job as well?

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Mar 27 2020, 2:05 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 27 2020, 2:05 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Mar 27 2020, 2:05 PM

Looks good to me, but please wait until D28367 and D28268 land, since they change the API of ApplicationLauncherJob for KServiceAction.

I do not think KActivities::ResourceInstance::notifyAccessed should be done from KIO, which doesn't depend on KActivities (and I would like to keep it that way).

broulik planned changes to this revision.Mar 29 2020, 10:33 AM

Will rebase on pending API change in D28268

broulik updated this revision to Diff 78840.Mar 30 2020, 7:39 AM
  • Adjust to API change in KServiceAction
  • Also don't use now deprecated QUrl::queryItemValue
dfaure accepted this revision.Apr 3 2020, 11:06 PM
This revision is now accepted and ready to land.Apr 3 2020, 11:06 PM
This revision was automatically updated to reflect the committed changes.