Port hotplug from KRun::runCommand to CommandLauncherJob.
ClosedPublic

Authored by dfaure on Apr 19 2020, 5:22 PM.

Details

Summary

Is there a better way to report error from this code than the dialog box
that KRun used to pop up (and KDialogJobUiDelegate does too)?

Test Plan

Untested.

Diff Detail

Repository
R120 Plasma Workspace
Branch
arcpatch-D28988
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 25742
Build 25760: arc lint + arc unit
dfaure created this revision.Apr 19 2020, 5:22 PM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 19 2020, 5:22 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
dfaure requested review of this revision.Apr 19 2020, 5:22 PM

In principle dataengine actions are jobs, so they could communicate a result back

As it is currently implemented, CommandLauncherJob is very unlikely to ever fail. It doesn't even fail on non-existing executable in the command (because it delegates to bash) so apart from QProcess cannot fork, it never fails. Probably not worth doing something complicated here then. I'll just use KNotificationJobUiDelegate?

dfaure updated this revision to Diff 80969.Apr 23 2020, 9:34 AM

Use KNotificationJobUiDelegate

dfaure updated this revision to Diff 80970.Apr 23 2020, 9:36 AM

Remove question from commit message

broulik accepted this revision.Apr 23 2020, 2:24 PM
This revision is now accepted and ready to land.Apr 23 2020, 2:24 PM
dfaure closed this revision.Apr 23 2020, 2:52 PM