[Kde-pim] KCal API: deleteIncidence(Incidence::Ptr)

Patrick Ohly patrick.ohly at gmx.de
Thu Nov 11 08:53:36 GMT 2010


Hello!

As a finger exercise and as a way to learn and verify the MeeGo calendar
storage system (KDE's KCalCore + Nokia's KCalExtended, aka mKCal), I
wrote a backend for SyncEvolution accessing calendar data via the mKCal
API.

I have some question about that API. Previously I used to send those
directly to Alvaro or put them into bugs.meego.com, but perhaps this
mailing list here would be a better place?

One open question is about Calendar::deleteIncidence(Incidence::Ptr).
>From http://bugs.meego.com/show_bug.cgi?id=6061:

Is the following function meant to remove one incidence in all cases?

bool Calendar::deleteIncidence      (      const Incidence::Ptr &incidence       )        [virtual]
Removes an Incidence from the calendar.
Parameters:
        incidence     is a pointer to the Incidence to remove.
Returns:
    true if the Incidence was successfully removed; false otherwise.
See also:
    addIncidence() 
Reimplemented in KCalCore::MemoryCalendar.

What I observe is that removing the master (or parent) incidence (the one with
recurrence rule and no recurrence ID) also removes the child event (the one
with recurrence ID). [test program in #6061]

This is unexpected behavior and IMHO neither aligned with description
("*an/the* incidence") nor the prototype of the method. Something which takes
an Incidence pointer should only operate on that Incidence.

I understand that there is some link between the two incidences, but I believe
that there is nothing wrong with having just the child in a calendar. Enforcing
that restriction is futile.

For example, a person might be sent two calendar invites:
1. for the master event
2. for the child event

In the following cases is it useful and unavoidable to import just the child
event:
a) first email got lost
b) user ignores first meeting request
c) user is only added to child event and is never sent the master event

Importing the child event without RECURRENCE-ID would be wrong, because later
the user might import the master event.

If you do not want to change the implementation of deleteIncidence(), can you
fix its description and add a second method which really only works on one
incidence?  

-- 
Bye, Patrick Ohly
--  
Patrick.Ohly at gmx.de
http://www.estamos.de/


_______________________________________________
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