[frameworks/kwallet] src/runtime/kwalletd: kwalletd: Remove config fallback for networkWallet()

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

kwalletd: Remove config fallback for networkWallet()

Currently we ask the FDO backend for the default collection,
and if that fails we fall back to reading from kwalletrc.

That seems unnecessary and potentially confusing. If the backend
fails there is some deeper issue going on.

Remove the fallback, and emit an error when the internal query fails.

M  +5    -3    src/runtime/kwalletd/kwalletd.cpp

https://invent.kde.org/frameworks/kwallet/-/commit/5fed650b0db2859f6fcab1b4c8b13e82e8b4d2aa

diff --git a/src/runtime/kwalletd/kwalletd.cpp b/src/runtime/kwalletd/kwalletd.cpp
index b2e3a566..7e800bee 100644
--- a/src/runtime/kwalletd/kwalletd.cpp
+++ b/src/runtime/kwalletd/kwalletd.cpp
@@ -1103,9 +1103,11 @@ QString KWalletD::networkWallet()
     bool ok;
     const QString defaultWallet = m_backend->defaultCollection(&ok);
 
-    KConfig cfg(QStringLiteral("kwalletrc"));
-    KConfigGroup walletGroup(&cfg, QStringLiteral("Wallet"));
-    return walletGroup.readEntry(QStringLiteral("Default Wallet"), defaultWallet);
+    if (!ok) {
+        sendErrorReply(QDBusError::Failed, QStringLiteral("Failed to query default collection"));
+        return {};
+    }
+    return defaultWallet;
 }
 
 QString KWalletD::localWallet()
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.