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

List:       kde-commits
Subject:    KDE/kdepim/akonadi/resources/kcal
From:       Volker Krause <vkrause () kde ! org>
Date:       2008-11-01 14:41:46
Message-ID: 1225550506.596221.25462.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 878639 by vkrause:

Don't put items from sub-resources in the top-level collection. As a
side-effect this causes duplicate incidence uids which triggers asserts
in KCal.


 M  +7 -9      kcalresource.cpp  


--- trunk/KDE/kdepim/akonadi/resources/kcal/kcalresource.cpp #878638:878639
@@ -212,16 +212,14 @@
   const KCal::Incidence::List incidenceList = mResource->rawIncidences();
   foreach ( KCal::Incidence *incidence, incidenceList ) {
     const QString subResource = mResource->subresourceIdentifier( incidence );
-    if ( subResource != collection.remoteId() ) {
-      if ( collection.parent() != Collection::root().id() )
-        continue;
+    if ( subResource == collection.remoteId() ||
+         ( subResource.isEmpty() && collection.parent() == Collection::root().id() ) ) {
+      Item item( mMimeVisitor->mimeType( incidence ) );
+      item.setRemoteId( incidence->uid() );
+      if ( mFullItemRetrieve )
+        item.setPayload<IncidencePtr>( IncidencePtr( incidence->clone() ) );
+      items << item;
     }
-
-    Item item( mMimeVisitor->mimeType( incidence ) );
-    item.setRemoteId( incidence->uid() );
-    if ( mFullItemRetrieve )
-      item.setPayload<IncidencePtr>( IncidencePtr( incidence->clone() ) );
-    items << item;
   }
 
   itemsRetrieved( items );
[prev in list] [next in list] [prev in thread] [next in thread] 

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