[Kde-pim] Bug in akonadi/resources/ical/icalresource.cpp ?

Kevin Krammer kevin.krammer at gmx.at
Wed Feb 11 13:16:25 GMT 2009


On Thursday 29 January 2009, David Jarvie wrote:
> There appears to be a bug in akonadi/resources/ical/icalresource.cpp, in
> ICalResource::itemChanged(). The line
>
> *incidence = *(payload.get());
>
> assumes that operator=() is virtual, but that not being the case it will
> only copy the base Incidence class part of what payload.get() returns - if
> it's an Event, for example, the Event d-pointer won't be copied. Even if
> it did work, it should first check that the Incidence sub-class type is
> the same on both sides of the assignment. Or am I completely mistaken?

I've created a helper class for type specific assignment based on the visitor 
interface defined in KCal.

Have it and a unit test ready for commit to libkdepim.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kcalassignmentvisitor.cpp
Type: text/x-c++src
Size: 3049 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090211/c6a773fd/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kcalassignmentvisitor.h
Type: text/x-c++hdr
Size: 3004 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090211/c6a773fd/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090211/c6a773fd/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