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
9856dc9a
Commit
9856dc9a
authored
Mar 17, 2021
by
Laurent Montel
😁
Browse files
Continue to implement mailmerge agent
parent
3b629b27
Changes
3
Hide whitespace changes
Inline
Side-by-side
agents/mailmergeagent/mailmergeagent.cpp
View file @
9856dc9a
...
...
@@ -136,9 +136,9 @@ void MailMergeAgent::configure(WId windowId)
void
MailMergeAgent
::
removeItem
(
qint64
item
)
{
//
if (mManager->itemRemoved(item)) {
//
reload();
//
}
if
(
mManager
->
itemRemoved
(
item
))
{
reload
();
}
}
void
MailMergeAgent
::
addItem
(
qint64
timestamp
,
...
...
@@ -164,15 +164,15 @@ void MailMergeAgent::addItem(qint64 timestamp,
void
MailMergeAgent
::
itemsRemoved
(
const
Akonadi
::
Item
::
List
&
items
)
{
//
bool needToReload = false;
//
for (const Akonadi::Item &item : items) {
//
if (mManager->itemRemoved(item.id())) {
//
needToReload = true;
//
}
//
}
//
if (needToReload) {
//
reload();
//
}
bool
needToReload
=
false
;
for
(
const
Akonadi
::
Item
&
item
:
items
)
{
if
(
mManager
->
itemRemoved
(
item
.
id
()))
{
needToReload
=
true
;
}
}
if
(
needToReload
)
{
reload
();
}
}
void
MailMergeAgent
::
itemsMoved
(
const
Akonadi
::
Item
::
List
&
items
,
...
...
agents/mailmergeagent/mailmergemanager.cpp
View file @
9856dc9a
...
...
@@ -24,3 +24,15 @@ QString MailMergeManager::printDebugInfo() const
void
MailMergeManager
::
load
(
bool
state
)
{}
void
MailMergeManager
::
stopAll
()
{}
bool
MailMergeManager
::
itemRemoved
(
Akonadi
::
Item
::
Id
id
)
{
// TODO
// if (mConfig->hasGroup(SendLaterUtil::sendLaterPattern().arg(id))) {
// removeInfo(id);
// mConfig->reparseConfiguration();
// Q_EMIT needUpdateConfigDialogBox();
// return true;
// }
return
false
;
}
agents/mailmergeagent/mailmergemanager.h
View file @
9856dc9a
...
...
@@ -6,6 +6,7 @@
#pragma once
#include <AkonadiCore/Item>
#include <QObject>
class
MailMergeManager
:
public
QObject
...
...
@@ -17,4 +18,5 @@ public:
Q_REQUIRED_RESULT
QString
printDebugInfo
()
const
;
void
load
(
bool
state
=
false
);
void
stopAll
();
Q_REQUIRED_RESULT
bool
itemRemoved
(
Akonadi
::
Item
::
Id
id
);
};
Write
Preview
Markdown
is supported
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