[ksmserver] Simplify call to kcminit
ClosedPublic

Authored by davidedmundson on Nov 1 2018, 12:22 PM.

Details

Summary

kcminit had a slot to start processing something and a signal to emit
when it's finished.

For DBus that's quite bad practice as it can leave you hanging in the
case of a kcminit crashing. It's better to use the return of the
original call to signal when something is done.

From ksmserver we can then just use DBus timeouts set on the interface
than a secondary timer.

We also remove a pointless blocking call to kcminit introspecting
everything, if kcminit is not running it will return with an error
immediately which is no slower than checking first if it's not running
and faster if it is.

Test Plan

Logged in
Session logs showed kcminit ran

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.
davidedmundson created this revision.Nov 1 2018, 12:22 PM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 1 2018, 12:22 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Nov 1 2018, 12:22 PM
zzag added a subscriber: zzag.Nov 1 2018, 12:27 PM
zzag added inline comments.
startkde/kcminit/main.h
36–37

It looks like there are no more signals anymore. Do we need Q_SIGNALS?

remove Q_SIGNALS

broulik accepted this revision.Nov 1 2018, 7:24 PM
This revision is now accepted and ready to land.Nov 1 2018, 7:24 PM
This revision was automatically updated to reflect the committed changes.
davidedmundson marked an inline comment as done.