Commit 2aa2a6d5 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Start to implement mailmergemanager

parent a3bd9f93
Pipeline #52813 passed with stage
in 26 minutes and 30 seconds
......@@ -5,6 +5,7 @@
*/
#include "mailmergeagent.h"
#include "mailmergemanager.h"
#include <AgentInstance>
#include <AgentManager>
#include <Akonadi/KMime/SpecialMailCollections>
......@@ -25,13 +26,14 @@
MailMergeAgent::MailMergeAgent(const QString &id)
: Akonadi::AgentBase(id)
, mManager(new MailMergeManager(this))
{
#if 0
connect(mManager, &SendLaterManager::needUpdateConfigDialogBox, this, &MailMergeAgent::needUpdateConfigDialogBox);
new MailMergeAgentAdaptor(this);
QDBusConnection::sessionBus().registerObject(QStringLiteral("/MailMergeAgent"), this, QDBusConnection::ExportAdaptors);
const QString service = Akonadi::ServerManager::self()->agentServiceName(Akonadi::ServerManager::Agent, QStringLiteral("akonadi_sendlater_agent"));
const QString service = Akonadi::ServerManager::self()->agentServiceName(Akonadi::ServerManager::Agent, QStringLiteral("akonadi_mergemail_agent"));
QDBusConnection::sessionBus().registerService(service);
......@@ -186,8 +188,7 @@ void MailMergeAgent::itemsMoved(const Akonadi::Item::List &items,
QString MailMergeAgent::printDebugInfo() const
{
// return mManager->printDebugInfo();
return {};
return mManager->printDebugInfo();
}
AKONADI_AGENT_MAIN(MailMergeAgent)
......@@ -7,7 +7,7 @@
#pragma once
#include <agentbase.h>
class SendLaterManager;
class MailMergeManager;
class MailMergeAgent : public Akonadi::AgentBase, public Akonadi::AgentBase::ObserverV3
{
......@@ -38,5 +38,6 @@ protected:
private:
void slotSendNow(Akonadi::Item::Id id);
void slotStartAgent();
MailMergeManager *const mManager;
bool mAgentInitialized = false;
};
......@@ -14,3 +14,9 @@ MailMergeManager::MailMergeManager(QObject *parent)
MailMergeManager::~MailMergeManager()
{
}
QString MailMergeManager::printDebugInfo() const
{
// TODO
return {};
}
......@@ -14,4 +14,5 @@ class MailMergeManager : public QObject
public:
explicit MailMergeManager(QObject *parent = nullptr);
~MailMergeManager() override;
Q_REQUIRED_RESULT QString printDebugInfo() const;
};
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