Commit aa75afb1 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[solidextras] Rename SolidLockBackend to FreedesktopLockBackend

It actually has nothing to do with Solid
parent f72d460e
Pipeline #116073 passed with stage
in 1 minute and 14 seconds
......@@ -19,7 +19,7 @@ if (ANDROID)
else()
list(APPEND solidextras_srcs
solidbrightnessbackend.cpp
solidlockbackend.cpp
freedesktoplockbackend.cpp
networkstatus_dbus.cpp
)
qt_add_dbus_interface(solidextras_srcs org.kde.Solid.PowerManagement.Actions.BrightnessControl.xml brightnesscontroldbusinterface)
......
......@@ -4,25 +4,25 @@
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "solidlockbackend.h"
#include "freedesktoplockbackend.h"
#include "screensaverdbusinterface.h"
#include <QDBusConnection>
SolidLockBackend::SolidLockBackend(QObject *parent)
FreedesktopLockBackend::FreedesktopLockBackend(QObject *parent)
: LockBackend(parent)
, m_cookie(0)
{
m_iface = new OrgFreedesktopScreenSaverInterface(QStringLiteral("org.freedesktop.ScreenSaver"), QStringLiteral("/org/freedesktop/ScreenSaver"), QDBusConnection::sessionBus(), this);
}
void SolidLockBackend::setInhibitionOff()
void FreedesktopLockBackend::setInhibitionOff()
{
m_iface->UnInhibit(m_cookie);
}
void SolidLockBackend::setInhibitionOn(const QString &explanation)
void FreedesktopLockBackend::setInhibitionOn(const QString &explanation)
{
m_cookie = m_iface->Inhibit(QStringLiteral("org.kde.itinerary"), explanation);
}
......
......@@ -12,11 +12,11 @@
class OrgFreedesktopScreenSaverInterface;
class SolidLockBackend : public LockBackend
class FreedesktopLockBackend : public LockBackend
{
public:
explicit SolidLockBackend(QObject *parent = nullptr);
explicit FreedesktopLockBackend(QObject *parent = nullptr);
void setInhibitionOff() override;
void setInhibitionOn(const QString &explanation) override;
......
......@@ -11,7 +11,7 @@
#if defined(Q_OS_ANDROID)
#include "androidlockbackend.h"
#elif defined(Q_OS_LINUX)
#include "solidlockbackend.h"
#include "freedesktoplockbackend.h"
#endif
LockManager::LockManager(QObject *parent)
......@@ -21,7 +21,7 @@ LockManager::LockManager(QObject *parent)
#if defined(Q_OS_ANDROID)
m_backend = new AndroidLockBackend(this);
#elif defined(Q_OS_LINUX)
m_backend = new SolidLockBackend(this);
m_backend = new FreedesktopLockBackend(this);
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment