D24629: RFC: Introduce KClockSkewNotifier class

2022-04-29 Thread Vlad Zahorodnii
zzag abandoned this revision.

REPOSITORY
  R244 KCoreAddons

REVISION DETAIL
  https://phabricator.kde.org/D24629

To: zzag, #frameworks
Cc: apol, davidedmundson, kde-frameworks-devel, LeGast00n, cblack, michaelh, 
ahmadsamir, ngraham, bruns, vkrause


D24629: RFC: Introduce KClockSkewNotifier class

2020-01-13 Thread Vlad Zahorodnii
zzag updated this revision to Diff 73471.
zzag added a comment.


  Fix a typo.

REPOSITORY
  R244 KCoreAddons

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D24629?vs=73158=73471

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: apol, davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns


D24629: RFC: Introduce KClockSkewNotifier class

2020-01-09 Thread Vlad Zahorodnii
zzag updated this revision to Diff 73158.
zzag added a comment.


  Build with older versions of glibc. See D26553 


REPOSITORY
  R244 KCoreAddons

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D24629?vs=72993=73158

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: apol, davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns


D24629: RFC: Introduce KClockSkewNotifier class

2020-01-07 Thread Vlad Zahorodnii
zzag added a comment.


  The KWin patch has landed. Can we proceed now?

REPOSITORY
  R244 KCoreAddons

REVISION DETAIL
  https://phabricator.kde.org/D24629

To: zzag, #frameworks
Cc: apol, davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns


D24629: RFC: Introduce KClockSkewNotifier class

2020-01-07 Thread Vlad Zahorodnii
zzag updated this revision to Diff 72993.
zzag added a comment.


  Rename signal.

REPOSITORY
  R244 KCoreAddons

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D24629?vs=67889=72993

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: apol, davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns


D24629: RFC: Introduce KClockSkewNotifier class

2020-01-06 Thread Vlad Zahorodnii
zzag reclaimed this revision.
zzag added a comment.


  D25962  adds one usage of 
(K)ClockSkewNotifier in KWin.

REPOSITORY
  R244 KCoreAddons

REVISION DETAIL
  https://phabricator.kde.org/D24629

To: zzag, #frameworks
Cc: apol, davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns


D24629: RFC: Introduce KClockSkewNotifier class

2019-10-14 Thread Vlad Zahorodnii
zzag abandoned this revision.
zzag added a comment.


  Okay

REPOSITORY
  R244 KCoreAddons

REVISION DETAIL
  https://phabricator.kde.org/D24629

To: zzag, #frameworks
Cc: apol, davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns


D24629: RFC: Introduce KClockSkewNotifier class

2019-10-14 Thread Aleix Pol Gonzalez
apol added a comment.


  It feels weird to create a class directly into KF5 when it hasn't even 
started to be used.
  It could make sense to develop it within some of the apps and when we are 
sure the API is stable and it wants to be used on other components/products, we 
can promote it to the right framework.

REPOSITORY
  R244 KCoreAddons

REVISION DETAIL
  https://phabricator.kde.org/D24629

To: zzag, #frameworks
Cc: apol, davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, 
ngraham, bruns


D24629: RFC: Introduce KClockSkewNotifier class

2019-10-14 Thread David Edmundson
davidedmundson added a comment.


  We have similar code in plasma-workspace/dataengines/time
  
  that has a faux BSD implementation by using a combination of the legacy, but 
working:
  
QDBusConnection dbus = QDBusConnection::sessionBus();
dbus.connect(QString(), QString(), QStringLiteral("org.kde.KTimeZoned"), 
QStringLiteral("timeZoneChanged"), this, SLOT(tzConfigChanged()));
  
  and equally legacy, but working
  
dbus.connect(QStringLiteral("org.kde.Solid.PowerManagement"),
 
QStringLiteral("/org/kde/Solid/PowerManagement/Actions/SuspendSession"),
 
QStringLiteral("org.kde.Solid.PowerManagement.Actions.SuspendSession"),
 QStringLiteral("resumingFromSuspend"),
 this,
 SLOT(clockSkewed()))
  
  Obviously this doesn't cover all the cases (like some ntp service kicking in) 
but it's better than nothing.
  
  ---
  
  AFAIK all the usecases above could use the existing dataengine, but I'm not 
against replacing dataengines with library code.

REPOSITORY
  R244 KCoreAddons

REVISION DETAIL
  https://phabricator.kde.org/D24629

To: zzag, #frameworks
Cc: davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns


D24629: RFC: Introduce KClockSkewNotifier class

2019-10-14 Thread Vlad Zahorodnii
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