Commit b4b4bf03 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Improve manager

parent 1c9762e7
......@@ -20,15 +20,17 @@
#include "dkimmanagerauthenticationservertest.h"
#include "dkim-verify/dkimmanagerauthenticationserver.h"
#include <QTest>
#include <QStandardPaths>
QTEST_GUILESS_MAIN(DKIMManagerAuthenticationServerTest)
DKIMManagerAuthenticationServerTest::DKIMManagerAuthenticationServerTest(QObject *parent)
: QObject(parent)
{
QStandardPaths::setTestModeEnabled(true);
}
void DKIMManagerAuthenticationServerTest::shouldHaveDefaultValue()
{
//TODO
MessageViewer::DKIMManagerAuthenticationServer w;
QVERIFY(w.serverList().isEmpty());
}
......@@ -18,6 +18,10 @@
*/
#include "dkimmanagerauthenticationserver.h"
#include "dkimutil.h"
#include <KConfigGroup>
#include <KSharedConfig>
using namespace MessageViewer;
DKIMManagerAuthenticationServer::DKIMManagerAuthenticationServer(QObject *parent)
......@@ -28,7 +32,7 @@ DKIMManagerAuthenticationServer::DKIMManagerAuthenticationServer(QObject *parent
DKIMManagerAuthenticationServer::~DKIMManagerAuthenticationServer()
{
save();
}
......@@ -37,3 +41,23 @@ DKIMManagerAuthenticationServer *DKIMManagerAuthenticationServer::self()
static DKIMManagerAuthenticationServer s_self;
return &s_self;
}
QStringList DKIMManagerAuthenticationServer::serverList() const
{
return mServerList;
}
void DKIMManagerAuthenticationServer::setServerList(const QStringList &serverList)
{
mServerList = serverList;
}
void DKIMManagerAuthenticationServer::load()
{
//TODO
}
void DKIMManagerAuthenticationServer::save()
{
//TODO
}
......@@ -31,6 +31,14 @@ public:
explicit DKIMManagerAuthenticationServer(QObject *parent = nullptr);
~DKIMManagerAuthenticationServer();
static DKIMManagerAuthenticationServer *self();
Q_REQUIRED_RESULT QStringList serverList() const;
void setServerList(const QStringList &serverList);
private:
void load();
void save();
QStringList 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