mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Adapt to renamed night light d-bus interface
This commit is contained in:
parent
becd4b64e1
commit
17f0674cc2
3 changed files with 10 additions and 7 deletions
|
|
@ -1,8 +1,8 @@
|
|||
# SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set_source_files_properties(${KWIN_COLORCORRECT_INTERFACE} PROPERTIES NO_NAMESPACE TRUE)
|
||||
qt_add_dbus_interfaces(DBUS_SRCS ${KWIN_COLORCORRECT_INTERFACE})
|
||||
set_source_files_properties(${KWIN_NIGHTLIGHT_INTERFACE} PROPERTIES NO_NAMESPACE TRUE)
|
||||
qt_add_dbus_interfaces(DBUS_SRCS ${KWIN_NIGHTLIGHT_INTERFACE})
|
||||
|
||||
set(nightcolorplugin_SRCS
|
||||
nightcolorplugin.cpp
|
||||
|
|
|
|||
|
|
@ -8,7 +8,10 @@
|
|||
|
||||
NightColorUtil::NightColorUtil(QObject *parent)
|
||||
: QObject{parent}
|
||||
, m_ccInterface{new OrgKdeKwinColorCorrectInterface(QStringLiteral("org.kde.KWin"), QStringLiteral("/ColorCorrect"), QDBusConnection::sessionBus(), this)}
|
||||
, m_ccInterface{new OrgKdeKWinNightLightInterface(QStringLiteral("org.kde.KWin.NightLight"),
|
||||
QStringLiteral("/org/kde/KWin/NightLight"),
|
||||
QDBusConnection::sessionBus(),
|
||||
this)}
|
||||
, m_settings{new NightColorSettings(this)}
|
||||
{
|
||||
if (!m_ccInterface->isValid()) {
|
||||
|
|
@ -17,8 +20,8 @@ NightColorUtil::NightColorUtil(QObject *parent)
|
|||
m_enabled = m_ccInterface->running();
|
||||
|
||||
// subscribe to property updates
|
||||
QDBusConnection::sessionBus().connect(QStringLiteral("org.kde.KWin"),
|
||||
QStringLiteral("/ColorCorrect"),
|
||||
QDBusConnection::sessionBus().connect(QStringLiteral("org.kde.KWin.NightLight"),
|
||||
QStringLiteral("/org/kde/KWin/NightLight"),
|
||||
QStringLiteral("org.freedesktop.DBus.Properties"),
|
||||
QStringLiteral("PropertiesChanged"),
|
||||
this,
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
#include <QObject>
|
||||
|
||||
#include "colorcorrectinterface.h"
|
||||
#include "nightcolorsettings.h"
|
||||
#include "nightlightinterface.h"
|
||||
|
||||
class NightColorUtil : public QObject
|
||||
{
|
||||
|
|
@ -30,6 +30,6 @@ public Q_SLOTS:
|
|||
|
||||
private:
|
||||
bool m_enabled;
|
||||
OrgKdeKwinColorCorrectInterface *m_ccInterface;
|
||||
OrgKdeKWinNightLightInterface *m_ccInterface;
|
||||
NightColorSettings *m_settings;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue