[plasma/plasma-nm/Plasma/6.7] kded: secretagent: fix duplicate delete/update jobs

Matthias Kurz <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit d1194a1a7d91fffc7e03e72c5fe16583c27ed684 by Matthias Kurz, on behalf of Mickaël Thomas.
Committed on 17/08/2026 at 07:44.
Pushed by ngraham into branch 'Plasma/6.7'.

secretagent: fix duplicate delete/update jobs

Once a DeleteSecrets/UpdateSecrets request has started its corresponding
QKeychain jobs, it should not create new ones every time processNext()
is called

M  +4    -4    kded/secretagent.cpp

https://invent.kde.org/plasma/plasma-nm/-/commit/d1194a1a7d91fffc7e03e72c5fe16583c27ed684

diff --git a/kded/secretagent.cpp b/kded/secretagent.cpp
index ac30f472b..b1074fa55 100644
--- a/kded/secretagent.cpp
+++ b/kded/secretagent.cpp
@@ -494,8 +494,8 @@ bool SecretAgent::processSaveSecrets(QSharedPointer<SecretsRequest> request)
 {
     if (useSecureStorage()) {
         NetworkManager::ConnectionSettings connectionSettings(request->connection);
-        if (request->storageJobsRunning <= 0 && request->storageJobsStarted) {
-            return true;
+        if (request->storageJobsStarted) {
+            return (request->storageJobsRunning <= 0);
         }
         for (const NetworkManager::Setting::Ptr &setting : connectionSettings.settings()) {
             const auto secretsMap = setting->secretsToStringMap();
@@ -548,8 +548,8 @@ bool SecretAgent::processDeleteSecrets(QSharedPointer<SecretsRequest> request)
 {
     if (useSecureStorage()) {
         NetworkManager::ConnectionSettings connectionSettings(request->connection);
-        if (request->storageJobsRunning <= 0 && request->storageJobsStarted) {
-            return true;
+        if (request->storageJobsStarted) {
+            return (request->storageJobsRunning <= 0);
         }
         for (const NetworkManager::Setting::Ptr &setting : connectionSettings.settings()) {
             auto jobRequest = request.toWeakRef();
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.