[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim] mailcommon: Don't look at virtual folder
From: Montel Laurent <montel () kde ! org>
Date: 2011-11-25 11:49:30
Message-ID: 20111125114930.0C8B7A60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 7ba7e7a254912570a0e747a638654e517f24d4b5 by Montel Laurent.
Committed on 25/11/2011 at 12:49.
Pushed by mlaurent into branch 'master'.
Don't look at virtual folder
M +10 -6 mailcommon/foldertreewidgetproxymodel.cpp
http://commits.kde.org/kdepim/7ba7e7a254912570a0e747a638654e517f24d4b5
diff --git a/mailcommon/foldertreewidgetproxymodel.cpp \
b/mailcommon/foldertreewidgetproxymodel.cpp index 2f6534e..94748ad 100644
--- a/mailcommon/foldertreewidgetproxymodel.cpp
+++ b/mailcommon/foldertreewidgetproxymodel.cpp
@@ -173,12 +173,16 @@ QVariant FolderTreeWidgetProxyModel::data( const QModelIndex & \
index, int role) const QModelIndex sourceIndex = mapToSource( index );
const QModelIndex rowIndex = sourceIndex.sibling( sourceIndex.row(), 0 );
const Akonadi::Collection collection = sourceModel()->data( rowIndex, \
Akonadi::EntityTreeModel::CollectionRole \
).value<Akonadi::Collection>();
- const Akonadi::AgentInstance instance = Akonadi::AgentManager::self()->instance( \
collection.resource() );
- //TODO configurate it in 4.9 (we are in string freeze now)
- if ( !instance.isOnline() ) {
- return Qt::red;
- } else if ( instance.status() == Akonadi::AgentInstance::Broken ) {
- return Qt::gray;
+ if ( !MailCommon::Util::isVirtualCollection(collection) )
+ {
+
+ const Akonadi::AgentInstance instance = \
Akonadi::AgentManager::self()->instance( collection.resource() ); + //TODO \
configurate it in 4.9 (we are in string freeze now) + if ( !instance.isOnline() \
) { + return Qt::red;
+ } else if ( instance.status() == Akonadi::AgentInstance::Broken ) {
+ return Qt::gray;
+ }
}
}
return Akonadi::EntityRightsFilterModel::data( index, role );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic