From kde-commits Tue Dec 28 10:44:13 2010 From: Volker Krause Date: Tue, 28 Dec 2010 10:44:13 +0000 To: kde-commits Subject: KDE/kdepimlibs/akonadi Message-Id: <20101228104413.73672AC8AE () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129353311025577 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