Branch 'kolab/integration/4.13.0' - akonadi/entitytreemodel_p.cpp

Christian Mollekopf mollekopf at kolabsys.com
Mon Oct 13 17:58:50 CEST 2014


 akonadi/entitytreemodel_p.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c35de69e2edb95b6659de0e060c13e76dba4a1ee
Author: Christian Mollekopf <chrigi_1 at fastmail.fm>
Date:   Mon Oct 13 17:58:34 2014 +0200

    ETM: Fixed crash.
    
    Of course the index is not in the model if we don't show the root collection.

diff --git a/akonadi/entitytreemodel_p.cpp b/akonadi/entitytreemodel_p.cpp
index 5c4c254..756f8a7 100644
--- a/akonadi/entitytreemodel_p.cpp
+++ b/akonadi/entitytreemodel_p.cpp
@@ -1410,7 +1410,7 @@ void EntityTreeModelPrivate::itemFetchJobDone(KJob *job)
     // If collections are not in the model, there will be no valid index for them.
     if ((m_collectionFetchStrategy != EntityTreeModel::InvisibleCollectionFetch) &&
         (m_collectionFetchStrategy != EntityTreeModel::FetchNoCollections) &&
-        !(m_showRootCollection && collectionId == m_rootCollection.id())) {
+        !(!m_showRootCollection && collectionId == m_rootCollection.id())) {
         const QModelIndex index = indexForCollection(Collection(collectionId));
         Q_ASSERT(index.isValid());
         //To notify about the changed fetch and population state




More information about the commits mailing list