[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/mailcommon
From: Andras Mantia <amantia () kde ! org>
Date: 2010-10-27 13:01:44
Message-ID: 20101027130144.5D871AC897 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1190354 by amantia:
Cleanup code, both branches of the "if" do the same.
M +2 -10 filtermanager.cpp
--- trunk/KDE/kdepim/mailcommon/filtermanager.cpp #1190353:1190354
@@ -182,7 +182,6 @@
return 1;
}
bool stopIt = false;
- bool atLeastOneRuleMatched = false;
if ( !beginFiltering( item ) )
return 1;
@@ -198,8 +197,6 @@
// filter is applicable
if ( isMatching( item, (*it) ) ) {
- // filter matches
- atLeastOneRuleMatched = true;
// execute actions:
if ( (*it)->execActions(item, stopIt) == MailFilter::CriticalError ) {
return 2;
@@ -209,14 +206,9 @@
}
Akonadi::Collection targetFolder = MessageProperty::filterFolder( item );
- /* endFilter does a take() and addButKeepUID() to ensure the changed
- * message is on disk. This is unnessecary if nothing matched, so just
- * reset state and don't update the listview at all. */
- if ( atLeastOneRuleMatched ) {
+
endFiltering( item );
- } else {
- MessageProperty::setFiltering( item, false );
- }
+
if ( targetFolder.isValid() ) {
new Akonadi::ItemMoveJob( item, targetFolder, this ); // TODO: check result
return 0;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic