[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepimlibs/akonadi/kmime
From:       Volker Krause <vkrause () kde ! org>
Date:       2010-09-28 7:58:13
Message-ID: 20100928075813.B5671AC88E () svn ! kde ! org
[Download RAW message or body]

SVN commit 1180491 by vkrause:

Implement move to trash action.


 M  +12 -2     standardmailactionmanager.cpp  


--- trunk/KDE/kdepimlibs/akonadi/kmime/standardmailactionmanager.cpp #1180490:1180491
@@ -397,8 +397,18 @@
 
     void slotMoveToTrash()
     {
-      QAction *action = dynamic_cast<QAction*>( mParent->sender() );
-      qDebug() << Q_FUNC_INFO << action->data();
+      if ( mInterceptedActions.contains( StandardMailActionManager::MoveToTrash ) )
+        return;
+
+      if ( mCollectionSelectionModel->selection().indexes().isEmpty() )
+        return;
+
+      const Item::List items = mParent->selectedItems();
+      if ( items.isEmpty() )
+        return;
+
+      MoveToTrashCommand *command = new MoveToTrashCommand( \
const_cast<QAbstractItemModel*>( mCollectionSelectionModel->model() ), items, mParent \
); +      command->execute();
     }
 
     void slotMoveAllToTrash()


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic