Add timedated support into the clock KCM as an optional dependency
Review Request #122400 - Created Feb. 3, 2015 and submitted
The current time setting helper is incredibly broken.
It manually tries to run a range of NTP utilities, all of which are
We can just call timedated directly and cut out the middleman as it has
uses polkit anyway.
This is currently an optional dependency, and the original helper still
exists. It makes the code messy, but we have users to support for now.
Finding timedated is an cmake option rather than querying for systemd
libs to make it easier for those deploying shims, such as BSD.
(code is in two commits, first abstracting the saving from the dtime class; then adding in the second save mechanism)
could the implementation be split in two files: one for legacy, one for systemd? I think this could make reading the file easier.
Is it possible to determine at compile time whether the systemd component is available? E.g. check whether a dbus file is installed at a known location?
Thanks for going runtime selection. I think that will be appreciated
nitpick: removed an empty line
nitpick: added empty lines
does it need to be a blocking dbus call? Any chance in getting it use a watcher?
suggestion: move it into the dbus reply check
why wait? If I understand correctly the next dbus calls do not depend on the outcome of the first one. So you could just fire all of them and only check in the end whether they failed.
Don't do the stupid 5 second wait for ktimezoned if we're in timedated mode
Add comments in bool KclockModule::timedatedSave()
Revision 6 (+258 -89)