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

Merge remote-tracking branch 'origin/release/19.12'

parents f8321575 d7bb90bd
......@@ -23,16 +23,24 @@
#include <KConfig>
#include <KConfigGroup>
#include <QRegularExpression>
#ifdef USE_DKIM_CHECKER
#include <QtCrypto>
#endif
using namespace MessageViewer;
DKIMManagerKey::DKIMManagerKey(QObject *parent)
: QObject(parent)
{
#ifdef USE_DKIM_CHECKER
mQcaInitializer = new QCA::Initializer(QCA::Practical, 64);
#endif
loadKeys();
}
DKIMManagerKey::~DKIMManagerKey()
{
#ifdef USE_DKIM_CHECKER
delete mQcaInitializer;
#endif
saveKeys();
}
......
......@@ -22,7 +22,13 @@
#include <QObject>
#include "messageviewer_export.h"
#include "config-messageviewer.h"
#include <QVector>
#ifdef USE_DKIM_CHECKER
namespace QCA {
class Initializer;
}
#endif
namespace MessageViewer {
/**
* @brief The KeyInfo struct
......@@ -71,6 +77,9 @@ public:
Q_REQUIRED_RESULT QString keyValue(const QString &selector, const QString &domain);
private:
QVector<KeyInfo> mKeys;
#ifdef USE_DKIM_CHECKER
QCA::Initializer *mQcaInitializer = nullptr;
#endif
};
}
Q_DECLARE_TYPEINFO(MessageViewer::KeyInfo, Q_MOVABLE_TYPE);
......
......@@ -151,7 +151,6 @@
#ifdef USE_DKIM_CHECKER
#include "dkim-verify/dkimwidgetinfo.h"
#include "dkim-verify/dkimmanager.h"
#include <QtCrypto>
#endif
using namespace boost;
......@@ -193,8 +192,6 @@ ViewerPrivate::ViewerPrivate(Viewer *aParent, QWidget *mainWindow, KActionCollec
mMainWindow = aParent;
}
#ifdef USE_DKIM_CHECKER
//TODO move in managerkey I think
mQcaInitializer = new QCA::Initializer(QCA::Practical, 64);
mDkimWidgetInfo = new MessageViewer::DKIMWidgetInfo(mMainWindow);
#endif
if (_k_attributeInitialized.testAndSetAcquire(0, 1)) {
......@@ -263,9 +260,6 @@ ViewerPrivate::~ViewerPrivate()
mNodeHelper->forceCleanTempFiles();
qDeleteAll(mListMailSourceViewer);
delete mNodeHelper;
#ifdef USE_DKIM_CHECKER
delete mQcaInitializer;
#endif
}
//-----------------------------------------------------------------------------
......
......@@ -71,9 +71,6 @@ namespace MimeTreeParser {
class ObjectTreeParser;
}
#ifdef USE_DKIM_CHECKER
namespace QCA {
class Initializer;
}
namespace MessageViewer {
class DKIMWidgetInfo;
}
......@@ -700,7 +697,6 @@ public:
WebEngineViewer::LocalDataBaseManager *mPhishingDatabase = nullptr;
MessageViewer::ShowNextMessageWidget *mShowNextMessageWidget = nullptr;
#ifdef USE_DKIM_CHECKER
QCA::Initializer *mQcaInitializer = nullptr;
MessageViewer::DKIMWidgetInfo *mDkimWidgetInfo = nullptr;
#endif
};
......
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