[pim/messagelib/release/26.08] messageviewer/src/dkim-verify: Save DKIM authentication servers immediately

Carl Schwan <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 0e0d8ea7c88dc18361451add3e4182dd2c40f993 by Carl Schwan.
Committed on 10/08/2026 at 15:07.
Pushed by carlschwan into branch 'release/26.08'.

Save DKIM authentication servers immediately

As this is a singleton, saving in the dtor happens very late during
teardown, at a point KConfig's internals might already be gone.

Fixes an assert in a kdepim-addons unit test.


(cherry picked from commit 31128509094cfd4955ee3b799826034935f37495)

Co-authored-by: Volker Krause <[email protected]>

M  +2    -4    messageviewer/src/dkim-verify/dkimmanagerauthenticationserver.cpp

https://invent.kde.org/pim/messagelib/-/commit/0e0d8ea7c88dc18361451add3e4182dd2c40f993

diff --git a/messageviewer/src/dkim-verify/dkimmanagerauthenticationserver.cpp b/messageviewer/src/dkim-verify/dkimmanagerauthenticationserver.cpp
index 0a4c68c37..cb4344e4c 100644
--- a/messageviewer/src/dkim-verify/dkimmanagerauthenticationserver.cpp
+++ b/messageviewer/src/dkim-verify/dkimmanagerauthenticationserver.cpp
@@ -21,10 +21,7 @@ DKIMManagerAuthenticationServer::DKIMManagerAuthenticationServer(QObject *parent
 {
 }
 
-DKIMManagerAuthenticationServer::~DKIMManagerAuthenticationServer()
-{
-    save();
-}
+DKIMManagerAuthenticationServer::~DKIMManagerAuthenticationServer() = default;
 
 DKIMManagerAuthenticationServer *DKIMManagerAuthenticationServer::self()
 {
@@ -40,6 +37,7 @@ QStringList DKIMManagerAuthenticationServer::serverList() const
 void DKIMManagerAuthenticationServer::setServerList(const QStringList &serverList)
 {
     mServerList = serverList;
+    save();
 }
 
 void DKIMManagerAuthenticationServer::load()
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.