[plasma/kscreenlocker] /: Rename AbstractLocker
Nicolas Fella <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit da9966016629389ae9f8650ee616bc17ec2e9f1e by Nicolas Fella.
Committed on 22/07/2026 at 18:54.
Pushed by nicolasfella into branch 'master'.
Rename AbstractLocker
It's not abstract any more
M +2 -2 CMakeLists.txt
M +3 -3 ksldapp.cpp
M +2 -2 ksldapp.h
R +11 -11 locker.cpp [from: abstractlocker.cpp - 088% similarity]
R +6 -6 locker.h [from: abstractlocker.h - 085% similarity]
https://invent.kde.org/plasma/kscreenlocker/-/commit/da9966016629389ae9f8650ee616bc17ec2e9f1e
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 34a6707a..93ec4150 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -152,13 +152,13 @@ set(kscreensaver_dbusXML dbus/org.kde.screensaver.xml)
set(powerdevilpolicyagent_xml dbus/kf6_org.kde.Solid.PowerManagement.PolicyAgent.xml)
set(ksld_SRCS
- abstractlocker.cpp
+ locker.cpp
ksldapp.cpp
interface.cpp
globalaccel.cpp
logind.cpp
powermanagement_inhibition.cpp
- abstractlocker.h
+ locker.h
ksldapp.h
interface.h
globalaccel.h
diff --git a/ksldapp.cpp b/ksldapp.cpp
index 1642aa20..e211eb60 100644
--- a/ksldapp.cpp
+++ b/ksldapp.cpp
@@ -7,10 +7,10 @@
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "ksldapp.h"
-#include "abstractlocker.h"
#include "globalaccel.h"
#include "interface.h"
#include "kscreensaversettings.h"
+#include "locker.h"
#include "logind.h"
#include "powermanagement_inhibition.h"
@@ -470,13 +470,13 @@ void KSldApp::showLockWindow()
if (!m_lockWindow) {
qCDebug(KSCREENLOCKER) << "Creating lock window";
- m_lockWindow = new AbstractLocker(this);
+ m_lockWindow = new Locker(this);
if (!m_lockWindow) {
return;
}
m_lockWindow->setGlobalAccel(m_globalAccel);
- connect(m_lockWindow, &AbstractLocker::lockWindowShown, this, &KSldApp::lockScreenShown);
+ connect(m_lockWindow, &Locker::lockWindowShown, this, &KSldApp::lockScreenShown);
}
}
diff --git a/ksldapp.h b/ksldapp.h
index fd6b7662..ba36fb4d 100644
--- a/ksldapp.h
+++ b/ksldapp.h
@@ -43,7 +43,7 @@ enum class EstablishLock {
**/
QString establishLockToString(EstablishLock establishLock);
-class AbstractLocker;
+class Locker;
/**
* @class KSldApp
* @brief The KSldApp class represents the application responsible for screen locking.
@@ -340,7 +340,7 @@ private:
/**
* The lock window used to display the lock screen.
**/
- AbstractLocker *m_lockWindow;
+ Locker *m_lockWindow;
/**
* Timer to measure how long the screen is locked.
diff --git a/abstractlocker.cpp b/locker.cpp
similarity index 88%
rename from abstractlocker.cpp
rename to locker.cpp
index e0e3eeab..4fa6c76d 100644
--- a/abstractlocker.cpp
+++ b/locker.cpp
@@ -9,7 +9,7 @@ SPDX-FileCopyrightText: 2015 Bhushan Shah <[email protected]>
SPDX-License-Identifier: GPL-2.0-or-later
*/
-#include "abstractlocker.h"
+#include "locker.h"
#include "kscreenlocker_logging.h"
#include <QApplication>
@@ -22,7 +22,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
namespace ScreenLocker
{
-BackgroundWindow::BackgroundWindow(AbstractLocker *lock)
+BackgroundWindow::BackgroundWindow(Locker *lock)
: QRasterWindow()
, m_lock(lock)
{
@@ -97,7 +97,7 @@ void BackgroundWindow::emergencyShow()
show();
}
-AbstractLocker::AbstractLocker(QObject *parent)
+Locker::Locker(QObject *parent)
: QObject(parent)
{
if (qobject_cast<QGuiApplication *>(QCoreApplication::instance())) {
@@ -108,21 +108,21 @@ AbstractLocker::AbstractLocker(QObject *parent)
updateGeometryOfBackground();
const auto screens = qApp->screens();
for (auto s : screens) {
- connect(s, &QScreen::geometryChanged, this, &AbstractLocker::updateGeometryOfBackground);
+ connect(s, &QScreen::geometryChanged, this, &Locker::updateGeometryOfBackground);
}
connect(qApp, &QGuiApplication::screenAdded, this, [this](QScreen *s) {
- connect(s, &QScreen::geometryChanged, this, &AbstractLocker::updateGeometryOfBackground);
+ connect(s, &QScreen::geometryChanged, this, &Locker::updateGeometryOfBackground);
updateGeometryOfBackground();
});
- connect(qApp, &QGuiApplication::screenRemoved, this, &AbstractLocker::updateGeometryOfBackground);
+ connect(qApp, &QGuiApplication::screenRemoved, this, &Locker::updateGeometryOfBackground);
}
}
-AbstractLocker::~AbstractLocker()
+Locker::~Locker()
{
}
-void AbstractLocker::emergencyShow()
+void Locker::emergencyShow()
{
if (m_background.isNull()) {
return;
@@ -130,13 +130,13 @@ void AbstractLocker::emergencyShow()
m_background->emergencyShow();
}
-void AbstractLocker::addAllowedWindow(quint32 windows)
+void Locker::addAllowedWindow(quint32 windows)
{
Q_UNUSED(windows)
Q_EMIT lockWindowShown();
}
-void AbstractLocker::updateGeometryOfBackground()
+void Locker::updateGeometryOfBackground()
{
QRect combined;
const auto screens = qApp->screens();
@@ -148,4 +148,4 @@ void AbstractLocker::updateGeometryOfBackground()
}
}
-#include "moc_abstractlocker.cpp"
+#include "moc_locker.cpp"
diff --git a/abstractlocker.h b/locker.h
similarity index 85%
rename from abstractlocker.h
rename to locker.h
index 3a3fb08b..e8356e0d 100644
--- a/abstractlocker.h
+++ b/locker.h
@@ -18,13 +18,13 @@ class GlobalAccel;
namespace ScreenLocker
{
-class AbstractLocker;
+class Locker;
class BackgroundWindow : public QRasterWindow
{
Q_OBJECT
public:
- explicit BackgroundWindow(AbstractLocker *lock);
+ explicit BackgroundWindow(Locker *lock);
~BackgroundWindow() override;
void emergencyShow();
@@ -33,16 +33,16 @@ protected:
void paintEvent(QPaintEvent *) override;
private:
- AbstractLocker *m_lock;
+ Locker *m_lock;
bool m_greeterFailure = false;
};
-class AbstractLocker : public QObject
+class Locker : public QObject
{
Q_OBJECT
public:
- explicit AbstractLocker(QObject *parent);
- ~AbstractLocker() override;
+ explicit Locker(QObject *parent);
+ ~Locker() override;
void addAllowedWindow(quint32 window);