Commit 2173b7e5 authored by Laurent Montel's avatar Laurent Montel 😁

Remove akonadi support

parent 433e1807
cmake_minimum_required(VERSION 3.0)
set(PIM_VERSION "5.5.48")
set(PIM_VERSION "5.5.49")
if (POLICY CMP0053)
cmake_policy(SET CMP0053 NEW)
......
......@@ -48,7 +48,7 @@ void MessageFactoryForwardJob::start()
if (!mTemplate.isEmpty()) {
parser->process(mTemplate, mOrigMsg);
} else {
parser->process(mOrigMsg, mCollection);
parser->process(mOrigMsg, mCollection.id());
}
}
......
......@@ -53,7 +53,7 @@ void MessageFactoryReplyJob::start()
if (!mTemplate.isEmpty()) {
parser->process(mTemplate, mOrigMsg);
} else {
parser->process(mOrigMsg, mCollection);
parser->process(mOrigMsg, mCollection.id());
}
}
......
......@@ -19,7 +19,6 @@ macro(add_templateparser_unittest _source)
Qt5::Test
KF5::KIOCore
KF5::Mime
KF5::AkonadiCore
KF5::IdentityManagement
KF5::XmlGui
KF5::Completion
......
......@@ -21,6 +21,7 @@ set(templateparser_LIB_SRCS
templateextracthtmlelementwebengineview.cpp
templateparserextracthtmlinfo.cpp
templateparserextracthtmlinforesult.cpp
templateparseremailaddressrequesterbase.cpp
)
......@@ -84,6 +85,7 @@ ecm_generate_headers(TemplateParser_CamelCase_HEADERS
TemplatesInsertCommand
TemplateParserJob
TemplateParserExtractHtmlInfoResult
TemplateParserEmailAddressRequesterBase
REQUIRED_HEADERS TemplateParser_HEADERS
PREFIX TemplateParser
)
......
......@@ -255,7 +255,7 @@ QString TemplateParserJob::getLastName(const QString &str)
}
void TemplateParserJob::process(const KMime::Message::Ptr &aorig_msg,
const Akonadi::Collection &afolder)
qint64 afolder)
{
if (aorig_msg == nullptr) {
qCDebug(TEMPLATEPARSER_LOG) << "aorig_msg == 0!";
......@@ -264,7 +264,7 @@ void TemplateParserJob::process(const KMime::Message::Ptr &aorig_msg,
}
mOrigMsg = aorig_msg;
mFolder = afolder.isValid() ? afolder.id() : -1;
mFolder = afolder;
const QString tmpl = findTemplate();
if (tmpl.isEmpty()) {
Q_EMIT parsingDone(mForceCursorPosition);
......@@ -274,17 +274,17 @@ void TemplateParserJob::process(const KMime::Message::Ptr &aorig_msg,
}
void TemplateParserJob::process(const QString &tmplName, const KMime::Message::Ptr &aorig_msg,
const Akonadi::Collection &afolder)
qint64 afolder)
{
mForceCursorPosition = false;
mOrigMsg = aorig_msg;
mFolder = afolder.isValid() ? afolder.id() : -1;
mFolder = afolder;
const QString tmpl = findCustomTemplate(tmplName);
processWithTemplate(tmpl);
}
void TemplateParserJob::processWithIdentity(uint uoid, const KMime::Message::Ptr &aorig_msg,
const Akonadi::Collection &afolder)
qint64 afolder)
{
mIdentity = uoid;
process(aorig_msg, afolder);
......@@ -1379,7 +1379,7 @@ QString TemplateParserJob::findTemplate()
QString tmpl;
qCDebug(TEMPLATEPARSER_LOG) << "Folder found:" << mFolder;
qCDebug(TEMPLATEPARSER_LOG) << "Folder identify found:" << mFolder;
if (mFolder >= 0) { // only if a folder was found
QString fid = QString::number(mFolder);
Templates fconf(fid);
......
......@@ -24,7 +24,6 @@
#include "templateparserextracthtmlinforesult.h"
#include <MessageViewer/ObjectTreeEmptySource>
#include <AkonadiCore/Collection>
#include <KMime/KMimeMessage>
#include <QObject>
......@@ -213,11 +212,11 @@ public:
void setCharsets(const QStringList &charsets);
void process(const KMime::Message::Ptr &aorig_msg,
const Akonadi::Collection &afolder = Akonadi::Collection());
qint64 afolder = -1);
void process(const QString &tmplName, const KMime::Message::Ptr &aorig_msg,
const Akonadi::Collection &afolder = Akonadi::Collection());
qint64 afolder = -1);
void processWithIdentity(uint uoid, const KMime::Message::Ptr &aorig_msg,
const Akonadi::Collection &afolder = Akonadi::Collection());
qint64 afolder = -1);
void processWithTemplate(const QString &tmpl);
......
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