D24629: RFC: Introduce KClockSkewNotifier class
Vlad Zahorodnii
noreply at phabricator.kde.org
Mon Oct 14 11:51:58 BST 2019
zzag created this revision.
zzag added a reviewer: Frameworks.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
zzag requested review of this revision.
REVISION SUMMARY
The new class provides a way for monitoring system clock changes. This
class can be useful for applications that build their logic around time,
for example dynamic wallpapers, so reacting to system clock changes is
quite crucial for them.
The new class can also be useful for Night Color in KWin and time data
engine as they two don't have support for FreeBSD. KClockSkewNotifier
also doesn't have support for FreeBSD at this moment, however when it
gains that, we'll have to patch only one place rather than two.
All good stuff happens in so called "notifier engines." A notifier
engine is responsible for detecting system clock changes and all
platform-specific code must reside there. KClockSkewNotifier is just a
thin wrapper around the corresponding engine, which is loaded and
unloaded as needed.
In long term, we need to add a couple more notifier engines. One for
Windows(?), one for FreeBSD(?), and one that doesn't use any platform
specific APIs but QTimer.
"KClockSkewNotifier" is not the best name. I'm open to suggestions.
TEST PLAN
No autotests because setting time requires root privileges.
REPOSITORY
R244 KCoreAddons
BRANCH
kclockskewnotifier
REVISION DETAIL
https://phabricator.kde.org/D24629
AFFECTED FILES
src/lib/CMakeLists.txt
src/lib/clock/kclockskewnotifier.cpp
src/lib/clock/kclockskewnotifier.h
src/lib/clock/kclockskewnotifierengine.cpp
src/lib/clock/kclockskewnotifierengine_linux.cpp
src/lib/clock/kclockskewnotifierengine_linux_p.h
src/lib/clock/kclockskewnotifierengine_p.h
To: zzag, #frameworks
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191014/e1eb32b6/attachment.html>
More information about the Kde-frameworks-devel
mailing list