[plasma/kwin] src: Drop defunct option to lock config file

Nicolas Fella <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit c0b268c449516a1f969593718d113e766728deb0 by Nicolas Fella.
Committed on 27/07/2026 at 19:01.
Pushed by nicolasfella into branch 'master'.

Drop defunct option to lock config file

It doesn't do anything

M  +1    -13   src/main.cpp
M  +0    -3    src/main.h

https://invent.kde.org/plasma/kwin/-/commit/c0b268c449516a1f969593718d113e766728deb0

diff --git a/src/main.cpp b/src/main.cpp
index 9e3471a8aa6..533958f7fed 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -79,7 +79,6 @@ Atoms *atoms;
 
 Application::Application(int &argc, char **argv)
     : QApplication(argc, argv)
-    , m_configLock(false)
     , m_config(KSharedConfig::openConfig(QStringLiteral("kwinrc")))
     , m_kxkbConfig()
     , m_kdeglobals(KSharedConfig::openConfig(QStringLiteral("kdeglobals")))
@@ -91,11 +90,6 @@ Application::Application(int &argc, char **argv)
     qRegisterMetaType<std::chrono::nanoseconds>();
 }
 
-void Application::setConfigLock(bool lock)
-{
-    m_configLock = lock;
-}
-
 void Application::start()
 {
     // Prevent KWin from synchronously autostarting kactivitymanagerd
@@ -107,7 +101,7 @@ void Application::start()
     setQuitOnLastWindowClosed(false);
     setQuitLockEnabled(false);
 
-    if (!m_config->isImmutable() && m_configLock) {
+    if (!m_config->isImmutable()) {
         // TODO: This shouldn't be necessary
         // config->setReadOnly( true );
         m_config->reparseConfiguration();
@@ -165,14 +159,9 @@ void Application::createAboutData()
     KAboutData::setApplicationData(aboutData);
 }
 
-static const QString s_lockOption = QStringLiteral("lock");
-
 void Application::setupCommandLine(QCommandLineParser *parser)
 {
-    QCommandLineOption lockOption(s_lockOption, i18n("Disable configuration options"));
-
     parser->setApplicationDescription(i18n("KDE window manager"));
-    parser->addOption(lockOption);
     KAboutData::applicationData().setupCommandLine(parser);
 }
 
@@ -180,7 +169,6 @@ void Application::processCommandLine(QCommandLineParser *parser)
 {
     KAboutData aboutData = KAboutData::applicationData();
     aboutData.processCommandLine(parser);
-    setConfigLock(parser->isSet(s_lockOption));
 }
 
 void Application::setupMalloc()
diff --git a/src/main.h b/src/main.h
index ae69bf15e21..0ed3cd723b7 100644
--- a/src/main.h
+++ b/src/main.h
@@ -72,8 +72,6 @@ class KWIN_EXPORT Application : public QApplication
 public:
     ~Application() override;
 
-    void setConfigLock(bool lock);
-
     KSharedConfigPtr config() const
     {
         return m_config;
@@ -319,7 +317,6 @@ private:
 #endif
     std::unique_ptr<WorkspaceScene> m_scene;
     bool m_followLocale1 = false;
-    bool m_configLock;
     bool m_initiallyLocked = false;
     bool m_supportsLockScreen = true;
     bool m_supportsGlobalShortcuts = true;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.