1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
$NetBSD: patch-ac,v 1.9 2005/12/11 11:40:02 markd Exp $
--- kmail/actionscheduler.cpp.orig 2005-09-10 20:24:02.000000000 +1200
+++ kmail/actionscheduler.cpp
@@ -570,7 +570,7 @@ void ActionScheduler::filterMessage()
(!mAccount ||
(mAccount && (*mFilterIt).applyOnAccount(mAccountId)))) ||
((mSet & KMFilterMgr::Explicit) && (*mFilterIt).applyOnExplicit())) {
-
+
// filter is applicable
if ( FilterLog::instance()->isLogging() ) {
QString logText( i18n( "<b>Evaluating filter rules:</b> " ) );
@@ -646,8 +646,11 @@ void ActionScheduler::moveMessage()
if (!orgMsg || !orgMsg->parent()) {
// Original message is gone, no point filtering it anymore
mSrcFolder->removeMsg( mSrcFolder->find( msg ) );
+ kdDebug(5006) << "The original serial number is missing. "
+ << "Cannot complete the filtering." << endl;
mExecutingLock = false;
processMessageTimer->start( 0, true );
+ return;
} else {
if (!folder) // no filter folder specified leave in current place
folder = orgMsg->parent();
@@ -659,7 +662,7 @@ void ActionScheduler::moveMessage()
mSrcFolder->addMsg( msg );
mIgnore = false;
- if (msg && kmkernel->folderIsTrash( folder ))
+ if (msg && folder && kmkernel->folderIsTrash( folder ))
KMFilterAction::sendMDN( msg, KMime::MDN::Deleted );
timeOutTime = QTime::currentTime();
@@ -722,8 +725,6 @@ void ActionScheduler::moveMessageFinishe
void ActionScheduler::copyMessageFinished( KMCommand *command )
{
- // FIXME remove the debug output
- kdDebug(5006) << "##### ActionScheduler::copyMessageFinished( KMCommand *command )" << endl;
if ( command->result() != KMCommand::OK )
actionMessage( KMFilterAction::ErrorButGoOn );
else
@@ -803,4 +804,11 @@ bool ActionScheduler::isEnabled()
return sEnabled;
}
+bool ActionScheduler::ignoreChanges( bool ignore )
+{
+ bool oldValue = mIgnore;
+ mIgnore = ignore;
+ return oldValue;
+}
+
#include "actionscheduler.moc"
|