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