[kstart] Port to ApplicationLauncherJob and CommandLauncherJob
ClosedPublic

Authored by broulik on May 11 2020, 10:06 AM.

Details

Summary

The existing --service is kept for compatibility as it prints out the actually registered DBus name.
A new argument --application is added which also takes a desktop name. It prints the launched PID.

Test Plan
  • kstart5 kwrite launches kwrite
  • kstart5 --application org.kde.kwrite launches kwrites and has it properly scoped
  • kstart5 --application org.kde.kwrite --maximize launches kwrite and has it properly scoped and its window maximized
  • kstart5 --application org.kde.kwrite --url file:///home/foo/bar launches kwrite with that file open

Diff Detail

Repository
R126 KDE CLI Utilities
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.May 11 2020, 10:06 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 11 2020, 10:06 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.May 11 2020, 10:06 AM
davidedmundson added inline comments.
kstart/kstart.cpp
122

I know it's copied but, there's no need to randomly go to C to use std::cout

129

Isn't command launcherjob doing KStartupInfo things?

broulik updated this revision to Diff 82950.May 15 2020, 2:44 PM
  • Drop manual startup stuff
  • Drop C stuff
davidedmundson accepted this revision.May 15 2020, 2:49 PM
This revision is now accepted and ready to land.May 15 2020, 2:49 PM
This revision was automatically updated to reflect the committed changes.