Commit 4931647f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Avoid potential problem

parent 3b2aad70
......@@ -23,11 +23,12 @@
#include <KSharedConfig>
using namespace MessageViewer;
namespace {
static const char myConfigGroupName[] = "AuthenticationServer";
}
DKIMManagerAuthenticationServer::DKIMManagerAuthenticationServer(QObject *parent)
: QObject(parent)
{
}
DKIMManagerAuthenticationServer::~DKIMManagerAuthenticationServer()
......@@ -35,7 +36,6 @@ DKIMManagerAuthenticationServer::~DKIMManagerAuthenticationServer()
save();
}
DKIMManagerAuthenticationServer *DKIMManagerAuthenticationServer::self()
{
static DKIMManagerAuthenticationServer s_self;
......@@ -55,13 +55,13 @@ void DKIMManagerAuthenticationServer::setServerList(const QStringList &serverLis
void DKIMManagerAuthenticationServer::load()
{
const KSharedConfig::Ptr &config = KSharedConfig::openConfig(MessageViewer::DKIMUtil::defaultConfigFileName(), KConfig::NoGlobals);
KConfigGroup grp(config, "AuthenticationServer");
KConfigGroup grp(config, myConfigGroupName);
mServerList = grp.readEntry("ServerList", QStringList());
}
void DKIMManagerAuthenticationServer::save()
{
const KSharedConfig::Ptr &config = KSharedConfig::openConfig(MessageViewer::DKIMUtil::defaultConfigFileName(), KConfig::NoGlobals);
KConfigGroup grp(config, "AuthenticationServer");
KConfigGroup grp(config, myConfigGroupName);
grp.writeEntry("ServerList", mServerList);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment