use QDBusServiceWatcher instead of pinging the client
ClosedPublic

Authored by sitter on Aug 6 2018, 12:19 PM.

Details

Summary

the motivation here is to terminate the "server" helper when the client
disappears. dbus supports this use case natively via service registration
events which we can easily handle via QDBusServiceWatcher.
instead of repeatedly poking the client we'll simply monitor its dbus
service now. this is cheaper, less code and doesn't risk timing out
randomly.

Test Plan
  • on neon ISO build kpmcore & calamares & pm
  • calamares manages to actually partition stuff
  • partitionmanager also starts properly
  • also the same again on the installed system.

Diff Detail

Repository
R16 KPMCore
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter requested review of this revision.Aug 6 2018, 12:19 PM
sitter created this revision.

Since stikonas can't login to approve just now:

[14:21] <sitter> stikonas: if you are ok with me landing it we can skip the approval on phab
[14:21] <stikonas> yeah, mention that approval is given via IRC...
bshah accepted this revision.Aug 6 2018, 12:23 PM
bshah added a subscriber: bshah.
17:50 <stikonas> sitter: thanks, I briefly looked at it, looks good!
17:50 <stikonas> can't approve from this machine, don't have login credentials here
This revision is now accepted and ready to land.Aug 6 2018, 12:23 PM
This revision was automatically updated to reflect the committed changes.