kwin/colorcorrection
Vlad Zahorodnii 33f46f6d6c [nightcolor] Expose some properties to d-bus
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

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25946
2020-01-07 17:12:14 +02:00
..
colorcorrect_settings.kcfg
colorcorrect_settings.kcfgc
colorcorrectdbusinterface.cpp [nightcolor] Expose some properties to d-bus 2020-01-07 17:12:14 +02:00
colorcorrectdbusinterface.h [nightcolor] Expose some properties to d-bus 2020-01-07 17:12:14 +02:00
constants.h
manager.cpp [nightcolor] Expose some properties to d-bus 2020-01-07 17:12:14 +02:00
manager.h [nightcolor] Expose some properties to d-bus 2020-01-07 17:12:14 +02:00
suncalc.cpp
suncalc.h