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

List:       kde-commits
Subject:    [kdepimlibs/KDE/4.10] akonadi: Do not override local EntityDisplayAttribute on collection sync
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2013-03-03 16:55:16
Message-ID: 20130303165516.AA573A604F () git ! kde ! org
[Download RAW message or body]

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 <kdebug.h>
 #include <KLocale>
@@ -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<EntityDisplayAttribute>() ) {
+        upd.removeAttribute<EntityDisplayAttribute>();
+        upd.addAttribute( localNode->collection.attribute<EntityDisplayAtt=
ribute>()->clone() );
+      }
+
       {
         // ### HACK to work around the implicit move attempts of Collectio=
nModifyJob
         // which we do explicitly below
[prev in list] [next in list] [prev in thread] [next in thread] 

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