D25946: [nightcolor] Expose some properties to d-bus

Vlad Zahorodnii noreply at phabricator.kde.org
Fri Dec 13 13:21:54 GMT 2019


zzag created this revision.
zzag added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
zzag requested review of this revision.

REVISION SUMMARY
  Currently, in order to retrieve the current screen color temperature
  applied to all screen as well other attributes of night color manager,
  one has to call nightColorInfo() periodically. This goes against well
  established patterns in d-bus world. It is recommended to expose a
  bunch of d-bus properties rather than have a method that returns all
  relevant properties stored in a JSON object.
  
  The ugliest thing about this patch is that a lot of code is duplicated
  to emit the PropertiesChanged signal. Unfortunately, QtDBus doesn't
  take care of this and we are left with only two options - either do
  weird things with QMetaObject or manually emit the signal. I have
  picked the second option since it's more comprehensible and less magic
  is going on, but I have to admit that the chosen approach is ugly.
  
  I hope that "Qt 6 will fix it."
  
  CCBUG: 400418

REPOSITORY
  R108 KWin

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

AFFECTED FILES
  colorcorrection/colorcorrectdbusinterface.cpp
  colorcorrection/colorcorrectdbusinterface.h
  colorcorrection/manager.cpp
  colorcorrection/manager.h
  org.kde.kwin.ColorCorrect.xml

To: zzag, #kwin
Cc: kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20191213/8e20cee4/attachment.html>


More information about the kwin mailing list