Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KMail
Commits
2aa2a6d5
Commit
2aa2a6d5
authored
Mar 02, 2021
by
Laurent Montel
😁
Browse files
Start to implement mailmergemanager
parent
a3bd9f93
Pipeline
#52813
passed with stage
in 26 minutes and 30 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
agents/mailmergeagent/mailmergeagent.cpp
View file @
2aa2a6d5
...
...
@@ -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
)
agents/mailmergeagent/mailmergeagent.h
View file @
2aa2a6d5
...
...
@@ -7,7 +7,7 @@
#pragma once
#include <agentbase.h>
class
SendLater
Manager
;
class
MailMerge
Manager
;
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
;
};
agents/mailmergeagent/mailmergemanager.cpp
View file @
2aa2a6d5
...
...
@@ -14,3 +14,9 @@ MailMergeManager::MailMergeManager(QObject *parent)
MailMergeManager
::~
MailMergeManager
()
{
}
QString
MailMergeManager
::
printDebugInfo
()
const
{
// TODO
return
{};
}
agents/mailmergeagent/mailmergemanager.h
View file @
2aa2a6d5
...
...
@@ -14,4 +14,5 @@ class MailMergeManager : public QObject
public:
explicit
MailMergeManager
(
QObject
*
parent
=
nullptr
);
~
MailMergeManager
()
override
;
Q_REQUIRED_RESULT
QString
printDebugInfo
()
const
;
};
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment