[Kicker] Use KRun::runService instead of new KRun
ClosedPublic

Authored by broulik on Jun 15 2016, 5:56 PM.

Details

Summary

"new KRun" is only meant to run absolute file paths and so breaks when we get a
service with relative entryPath() like when finding a KCModule.

The tempFile argument causes this call to be asynchronous as to not block the UI

Test Plan

The tempFile hack has David Faure's blessing as new KRun is only meant for when opening files and the like. KRun::runService normally blocks but doesn't when we do the tempFiles thing. This fixes opening eg KCMs (search for eg "Splash" and add it to favorites).

  • Opening apps in favorites still works
  • Opening apps in recent docs still works
  • OPening docs in recent docs still works
  • Opening apps in apps still works
  • Opening KCMs in favorites now works
  • Opening KCMs in recent docs now works

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 4517.Jun 15 2016, 5:56 PM
broulik retitled this revision from to [Kicker] Use KRun::runService instead of new KRun.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added reviewers: Plasma, hein, dfaure.
broulik set the repository for this revision to R119 Plasma Desktop.
Restricted Application added a project: Plasma. · View Herald TranscriptJun 15 2016, 5:56 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
dfaure accepted this revision.Jun 15 2016, 7:38 PM
dfaure edited edge metadata.

Yes, but please add a comment about porting to KRun::runApplication once https://phabricator.kde.org/D1902 is merged in and you can rely on KF 5.24 :-)

This revision is now accepted and ready to land.Jun 15 2016, 7:38 PM
This revision was automatically updated to reflect the committed changes.