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

List:       kde-commits
Subject:    KDE/kdepimlibs/akonadi
From:       Volker Krause <vkrause () kde ! org>
Date:       2010-12-28 10:44:13
Message-ID: 20101228104413.73672AC8AE () svn ! kde ! org
[Download RAW message or body]

SVN commit 1209860 by vkrause:

Preserve more collection information if we have them available anyway.

This should give us access to collection attributes in itemChanged() in
the IMAP resource without any extra cost and enable checks if e.g. a
specific flag change is allowed in a folder at all.


 M  +9 -0      monitor_p.cpp  


--- trunk/KDE/kdepimlibs/akonadi/monitor_p.cpp #1209859:1209860
@@ -415,7 +415,16 @@
       it.setParentCollection( colDest );
     else
       it.setParentCollection( col );
+  } else {
+    // item has a valid parent collection, most likely due to retrieved ancestors
+    // still, collection might contain extra info, so inject that
+    if ( it.parentCollection() == col ) {
+      const Collection oldParent = it.parentCollection();
+      if ( oldParent.parentCollection().isValid() && !col.parentCollection().isValid() )
+        col.setParentCollection( oldParent.parentCollection() ); // preserve ancestor chain
+      it.setParentCollection( col );
   }
+  }
 
   // HACK: We have the remoteRevision stored in the itemParts set
   //       for delete operations to avoid protocol breakage
[prev in list] [next in list] [prev in thread] [next in thread] 

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