Move responsiblity for creating KService to CommandLauncherJob
Needs ReviewPublic

Authored by davidedmundson on Mar 25 2020, 2:03 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

KProcessRunner had two code paths for if data was part of the KService
or if it was separate pars. This leads to a lot of args and extra if
statements.

We can move this abstraction into CommandLineJob, creating a KService
instance as a data structure for our explicitly set iconName and user
visible name and command line.

Test Plan

Relevant unit test

Diff Detail

Repository
R241 KIO
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24217
Build 24235: arc lint + arc unit
davidedmundson created this revision.Mar 25 2020, 2:03 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 25 2020, 2:03 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Mar 25 2020, 2:03 PM

Lovely simplification

src/gui/kprocessrunner.cpp
125

I think we can still end up with a null service through ApplicationLauncherJob?

151

!isEmpty

rebase, fix icon

davidedmundson marked an inline comment as done.Mar 25 2020, 3:30 PM
davidedmundson added inline comments.
src/gui/kprocessrunner.cpp
125

I don't think so, or at least, it would be crashing already.

The constructor with the KService::Ptr uses service-> unconditionally