[Kde-pim] Question: KCal ResourceCalendar behavior

David Jarvie djarvie at kde.org
Thu Jan 31 01:19:52 GMT 2008


On Wed 30 January 2008 20:32:08 Kevin Krammer wrote:
> On Wednesday 30 January 2008, David Jarvie wrote:
> > Updating an incidence in KCal::ResourceCalendar doesn't in itself save
> > the incidence. But if you're using KCal::ResourceCached, the save policy
> > can be set to automatically save whenever the calendar is updated, or to
> > save at regular intervals. KOrganizer may be using this facility.
>
> I am directly subclassing the base class KCal::ResourceCalendar, but
> similar to ResourceCached I am using a CalendarLocal internally for
> implementing the accessor functionality.
>
> So my take is that KOrganizer itself is triggering the save on
> adding/changing.

I was just commenting that KOrganizer may well be using the facilities of 
KCal::ResourceCached to do its saves automatically, rather than implementing 
saves itself. Obviously if you don't use that class, you'll have to implement 
your own saves.

> > I'm not certain whether deletions are handled any differently.
>
> It seems so.
>
> In any case, directly modifying the items in Akonadi would fit it better,
> however since this is about backward compatability I wanted to make sure
> that applications don't manipulate the data without them knowing.

One thing I would be slightly wary of is saving modifications immediately. 
Because when an application modifies an incidence it might make several 
separate modifications to the same incidence as part of the same operation, 
any saves should be done after a short timeout (just as ResourceCached does 
when save-on-all-changes is set as the save policy).

-- 
David Jarvie.
KAlarm author and maintainer.
http://www.astrojar.org.uk/kalarm
_______________________________________________
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