To make the code more clear, the DBUS API for mailfilteragent is changed, but this is no problem, as the only user of that so far is KMail, which is updated. This is internal to "kdepim".
The change also removes some method overrides to avoid confusion and code duplication. Now all methods (except when we go through dbus) work on Akonadi::Item instead of item ids (that were qlonglong and not qint64 how it is defined...). This adds a little performance penalty, but the less code worths it imo.
Big refactoring: get only those parts for filtering that are really needed.
A biggish refactoring of the filter functionality:
1) Do not take the items from the cache only, as they might be incomplete (especially in online imap case, but not only).
This should fix the body loss bug on spam filtering.(Bug 287752 and similar ones + countless of reports on user list)
Might fix 293768.
2) Download only what is really needed for the filter and add safety checks that
the mail is not modified if the requested part is missing. So far the distinction
was only betwee the body and rest. This should speed up filtering.
Also related to 287752, but should fix also 292283, 288109.
3) Rename qDebug->kDebug + fix some includes
4) The code should also fix the duplicate mails appearing after filtering (some of the duplicates
with empty content), eg. 275233
All bug reporters: in case you still see the bug, reopen the corresponding one.
For the reports that were CC'd, but not closed, please try to reproduce and tell
the result.
So far the bug is fixed on master, but might be backported later to 4.9.
BUG: 287752
BUG: 292283
BUG: 288109
BUG: 286043
BUG: 295484
BUG: 302337
BUG: 295000
BUG: 295684
CCBUG: 293768
CCBUG: 275233
CCBUG: 293918
CCBUG: 284310
CCBUG: 286364
CCBUG: 283682
(cherry picked from commit d64d61b470c56b92294f6adee6d74305a217628d)
FIXED-IN: 4.9
1) Do not take the items from the cache only, as they might be incomplete (especially in online imap case, but not only).
This should fix the body loss bug on spam filtering.(Bug 287752 and similar ones + countless of reports on user list)
Might fix 293768.
2) Download only what is really needed for the filter and add safety checks that
the mail is not modified if the requested part is missing. So far the distinction
was only betwee the body and rest. This should speed up filtering.
Also related to 287752, but should fix also 292283, 288109.
3) Rename qDebug->kDebug + fix some includes
4) The code should also fix the duplicate mails appearing after filtering (some of the duplicates
with empty content), eg. 275233
All bug reporters: in case you still see the bug, reopen the corresponding one.
For the reports that were CC'd, but not closed, please try to reproduce and tell
the result.
So far the bug is fixed on master, but might be backported later to 4.9.
BUG: 287752
BUG: 292283
BUG: 288109
BUG: 286043
BUG: 295484
BUG: 302337
BUG: 295000
BUG: 295684
CCBUG: 293768
CCBUG: 275233
CCBUG: 293918
CCBUG: 284310
CCBUG: 286364
CCBUG: 283682
default identity from account.
David reported me it and it was reported to Bug 297912 - 'Reply to' uses
wrong identity if not explicitly set in 'folder properties'
FIXED-IN: 4.8.3
BUG: 297912