From kde-commits Sun Mar 03 16:55:16 2013 From: Tobias Koenig Date: Sun, 03 Mar 2013 16:55:16 +0000 To: kde-commits Subject: [kdepimlibs/KDE/4.10] akonadi: Do not override local EntityDisplayAttribute on collection sync Message-Id: <20130303165516.AA573A604F () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=136232973115612 Git commit 58d2031a0b690886916e38a6cf6fbcc30e962c5f by Tobias Koenig. Committed on 03/03/2013 at 17:51. Pushed by tokoe into branch 'KDE/4.10'. Do not override local EntityDisplayAttribute on collection sync We don't want the local settings of the user (e.g. custom folder names, icons etc.) to be overwritten by the default values from the resource on next collection sync. This is part of the fix for bug #314446 M +6 -0 akonadi/collectionsync.cpp http://commits.kde.org/kdepimlibs/58d2031a0b690886916e38a6cf6fbcc30e962c5f diff --git a/akonadi/collectionsync.cpp b/akonadi/collectionsync.cpp index c57cb7d..bb44fc3 100644 --- a/akonadi/collectionsync.cpp +++ b/akonadi/collectionsync.cpp @@ -26,6 +26,7 @@ #include "collectionmodifyjob.h" #include "collectionfetchscope.h" #include "collectionmovejob.h" +#include "entitydisplayattribute.h" = #include #include @@ -338,6 +339,11 @@ class CollectionSync::Private Collection upd( remoteNode->collection ); Q_ASSERT( !upd.remoteId().isEmpty() ); upd.setId( localNode->collection.id() ); + if ( localNode->collection.attribute() ) { + upd.removeAttribute(); + upd.addAttribute( localNode->collection.attribute()->clone() ); + } + { // ### HACK to work around the implicit move attempts of Collectio= nModifyJob // which we do explicitly below