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

List:       kde-commits
Subject:    KDE/kdepimlibs/akonadi
From:       Andreas Holzammer <andy () kdab ! com>
Date:       2010-12-22 14:58:37
Message-ID: 20101222145837.41C73AC8AA () svn ! kde ! org
[Download RAW message or body]

SVN commit 1208618 by aholzammer:

if a virtual collection had a item, it doesn't have to be in the model yet, so insert \
it

 M  +3 -5      entitytreemodel_p.cpp  


--- trunk/KDE/kdepimlibs/akonadi/entitytreemodel_p.cpp #1208617:1208618
@@ -1000,11 +1000,6 @@
 
   if ( isHidden( item ) )
     return;
-
-  if ( !m_items.contains( item.id() ) ) {
-    kWarning() << "Got a stale notification for an item which was already removed." \
                << item.id() << item.remoteId();
-    return;
-  }
   Q_ASSERT( m_collections.contains( collection.id() ) );
 
   if ( !m_mimeChecker.wantedMimeTypes().isEmpty() && !m_mimeChecker.isWantedItem( \
item ) ) @@ -1015,6 +1010,9 @@
   const QModelIndex parentIndex = indexForCollection( m_collections.value( \
collection.id() ) );  
   q->beginInsertRows( parentIndex, row, row );
+  if ( !m_items.contains( item.id() ) ) {
+      m_items.insert( item.id(), item );
+  }
   Node *node = new Node;
   node->id = item.id();
   node->parent = collection.id();


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

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