[frameworks/kwallet] src/runtime/kwalletd: Drop code for writing default wallet in kwalletd

Marco Martin <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit d8bbd87f7cfe7d1580945e70fbe2ae50b4310b54 by Marco Martin, on behalf of Nicolas Fella.
Committed on 27/07/2026 at 10:14.
Pushed by nicolasfella into branch 'master'.

Drop code for writing default wallet in kwalletd

The source of truth for the default wallet is always the FDO backend, not kwalletrc

M  +0    -16   src/runtime/kwalletd/kwalletd.cpp
M  +0    -3    src/runtime/kwalletd/kwalletd.h

https://invent.kde.org/frameworks/kwallet/-/commit/d8bbd87f7cfe7d1580945e70fbe2ae50b4310b54

diff --git a/src/runtime/kwalletd/kwalletd.cpp b/src/runtime/kwalletd/kwalletd.cpp
index 0dd54579..fc37abb4 100644
--- a/src/runtime/kwalletd/kwalletd.cpp
+++ b/src/runtime/kwalletd/kwalletd.cpp
@@ -90,19 +90,6 @@ KWalletD::KWalletD(QObject *parent)
     connect(m_backend, &SecretServiceClient::collectionListDirty, this, &KWalletD::walletListDirty);
 
     reconfigure();
-
-    m_configWatcher = KConfigWatcher::create(KSharedConfig::openConfig(QStringLiteral("kwalletrc")));
-    connect(m_configWatcher.data(), &KConfigWatcher::configChanged, this, [this]() {
-        bool ok = false;
-        KConfig cfg(QStringLiteral("kwalletrc"));
-        KConfigGroup walletGroup(&cfg, QStringLiteral("Wallet"));
-        const QString defaultCollection = m_backend->defaultCollection(&ok);
-        const QString newDefaultWallet = walletGroup.readEntry(QStringLiteral("Default Wallet"), defaultCollection);
-
-        if (newDefaultWallet != defaultCollection) {
-            m_backend->setDefaultCollection(newDefaultWallet, &ok);
-        }
-    });
 }
 
 KWalletD::~KWalletD()
@@ -226,9 +213,6 @@ void KWalletD::migrateData()
         }
     }
 
-    // The default wallet will always be the one Secret Service says
-    walletGroup.writeEntry(QStringLiteral("Default Wallet"), m_backend->defaultCollection(&ok));
-
     migrationGroup.writeEntry(QStringLiteral("WalletsMigratedToSecretService"), walletsMigrated);
     cfg.sync();
 }
diff --git a/src/runtime/kwalletd/kwalletd.h b/src/runtime/kwalletd/kwalletd.h
index 52a5820d..4f4f237e 100644
--- a/src/runtime/kwalletd/kwalletd.h
+++ b/src/runtime/kwalletd/kwalletd.h
@@ -9,8 +9,6 @@
 #include <QDBusContext>
 #include <QObject>
 
-#include <KConfigWatcher>
-
 #include "kwalletd_debug.h"
 
 struct Folder {
@@ -204,7 +202,6 @@ private:
     bool m_closeIdle = false;
     // in minutes
     int m_idleTime = 10 * 60 * 1000;
-    KConfigWatcher::Ptr m_configWatcher;
 
     static unsigned int s_lastTransaction;
 };
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.