[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs/akonadi/kmime
From: Andras Mantia <amantia () kde ! org>
Date: 2010-08-18 16:18:06
Message-ID: 20100818161806.71415AC855 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1165240 by amantia:
Implement duplicate mail removal (works both in mobile & desktop)
M +1 -0 CMakeLists.txt
A removeduplicatescommand.cpp [License: LGPL (v2.1+)]
A removeduplicatescommand_p.h [License: LGPL (v2.1+)]
M +14 -2 standardmailactionmanager.cpp
--- trunk/KDE/kdepimlibs/akonadi/kmime/CMakeLists.txt #1165239:1165240
@@ -52,6 +52,7 @@
markascommand.cpp
movecommand.cpp
movetotrashcommand.cpp
+ removeduplicatescommand.cpp
standardmailactionmanager.cpp
)
--- trunk/KDE/kdepimlibs/akonadi/kmime/standardmailactionmanager.cpp #1165239:1165240
@@ -43,6 +43,7 @@
#include <QtCore/QPointer>
#include <QtGui/QItemSelectionModel>
+#include "removeduplicatescommand_p.h"
using namespace Akonadi;
@@ -301,8 +302,19 @@
void slotRemoveDuplicates()
{
- QAction *action = dynamic_cast<QAction*>( mParent->sender() );
- qDebug() << Q_FUNC_INFO << action->data();
+ if ( mInterceptedActions.contains( StandardMailActionManager::RemoveDuplicates \
) ) + return;
+
+ if ( mCollectionSelectionModel->selection().indexes().isEmpty() )
+ return;
+
+ const QModelIndex index = mCollectionSelectionModel->selection().indexes().at( \
0 ); + Q_ASSERT( index.isValid() );
+ const Collection collection = index.data( CollectionModel::CollectionRole \
).value<Collection>(); + Q_ASSERT( collection.isValid() );
+
+ RemoveDuplicatesCommand *command = new RemoveDuplicatesCommand( \
const_cast<QAbstractItemModel*>( mCollectionSelectionModel->model() ), collection, \
mParent ); + command->execute();
}
void slotMailLocalSubscription()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic