[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-09-16 8:07:51
Message-ID: 20100916080751.D7DABAC88E () svn ! kde ! org
[Download RAW message or body]
SVN commit 1175941 by amantia:
Make the Mark As actions to work with multiple mails.
M +7 -6 standardmailactionmanager.cpp
--- trunk/KDE/kdepimlibs/akonadi/kmime/standardmailactionmanager.cpp #1175940:1175941
@@ -230,19 +230,20 @@
if ( mItemSelectionModel->selection().indexes().isEmpty() )
return;
- const QModelIndex index = mItemSelectionModel->selectedIndexes().first();
- if ( !index.isValid() )
- return;
-
+ Akonadi::Item::List items;
+ Q_FOREACH( QModelIndex index, mItemSelectionModel->selectedIndexes() ) {
+ Q_ASSERT( index.isValid() );
const Item item = index.data( EntityTreeModel::ItemRole ).value<Item>();
- if ( !item.isValid() )
+ items << item;
+ }
+ if ( items.isEmpty() )
return;
Akonadi::MessageStatus targetStatus;
targetStatus.setStatusFromStr( QLatin1String( typeStr ) );
- MarkAsCommand *command = new MarkAsCommand( targetStatus, \
Akonadi::Item::List() << item, mParent ); + MarkAsCommand *command = new \
MarkAsCommand( targetStatus, items, mParent ); command->execute();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic