[Kde-pim] Re: Does Akonadi::CollectionDeleteJob delete the backend data?

David Jarvie djarvie at kde.org
Thu Nov 11 19:49:46 GMT 2010


On Thursday 11 November 2010 19:24:43 Sérgio Martins wrote:
> 2010/11/11 David Jarvie <djarvie at kde.org>:
> > When I call CollectionDeleteJob, the backend data is deleted. (To be precise, the backend calendar is emptied of all events, but the empty calendar file remains.) Is this the intended behaviour, or should it simply delete the collection from Akonadi storage and leave the backend untouched? The apidox is unclear on this. As far as I can tell, I'm not doing anything else to cause the data to be lost.
> 
> No, you're not doing anything else, I remember we had the same problem
> in korganizer.
> 
> We ended up deleting the agent instead ( which removes collections
> too, and doesn't touch backend data ):
> 
>       const Akonadi::AgentInstance instance =
> Akonadi::AgentManager::self()->instance( collection.resource() );
>       if ( instance.isValid() ) {
>         Akonadi::AgentManager::self()->removeInstance( instance );
>       }

Thanks Sérgio, that does the trick. I'll update the apidox to clarify this.

Cheers,
-- 
David Jarvie.
KDE developer.
KAlarm author -- http://www.astrojar.org.uk/kalarm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20101111/aca40cad/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list