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

Christian Mollekopf mollekopf at kolabsys.com
Sat Jan 24 20:33:18 CET 2015


 akonadi/entitytreemodel_p.cpp |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit a8548cd6bb8bcd0e73eb6bf803850b5b6d60db87
Author: Christian Mollekopf <chrigi_1 at fastmail.fm>
Date:   Mon Feb 24 16:32:51 2014 +0100

    Fixed the "only new items appear in collections" bug.
    
    We have to avoid populating not-yet populated collectoins through signals
    as otherwise internal assumptions are broken resulting in the ETM never fetching
    the missing items.
    
    BUG: 324831
    (cherry picked from commit b9dd26b6eadc9673c521185d8aad2aea2dc4f5e6)

diff --git a/akonadi/entitytreemodel_p.cpp b/akonadi/entitytreemodel_p.cpp
index de5396d..a36b2f8 100644
--- a/akonadi/entitytreemodel_p.cpp
+++ b/akonadi/entitytreemodel_p.cpp
@@ -1069,6 +1069,12 @@ void EntityTreeModelPrivate::monitoredItemAdded( const Akonadi::Item& item, cons
     return;
   }
 
+  //Adding items to not yet populated columns would block fetchMore, resulting in only new items showing up in the collection
+  //This is only a problem with lazy population, otherwise fetchMore is not used at all
+  if ( (m_itemPopulation == EntityTreeModel::LazyPopulation) && !m_populatedCols.contains( collection.id() ) ) {
+    return;
+  }
+
   int row;
   QModelIndex parentIndex;
   if ( m_collectionFetchStrategy != EntityTreeModel::InvisibleCollectionFetch ) {




More information about the commits mailing list