[Kde-pim] Review Request: Type safe assignment of incidence pointers
Kevin Krammer
kevin.krammer at gmx.at
Thu Feb 12 11:35:22 GMT 2009
> On 2009-02-12 01:32:05, Volker Krause wrote:
> > I think the approach is correct. There is an assignment visitor in korganizer/incidencechanger.cpp already btw., we probably want to get rid of that one now. Also, I would prefer to have the assignment visitor in KCal instead of libkdepim, we just had removed dependencies from the runtime components to libkdepim.
I will have a look at the implementation in incidencechanger.
How about moving it into the kdepim/akonadi/kcal like the mime type visitor?
At least for the backport to 4.2 I don't think it would be good to introduce it as new public API.
- Kevin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/51/#review63
-----------------------------------------------------------
On 2009-02-11 11:28:57, Kevin Krammer wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/51/
> -----------------------------------------------------------
>
> (Updated 2009-02-11 11:28:57)
>
>
> Review request for KDE PIM.
>
>
> Summary
> -------
>
> As discovered by David Jarvie, some code parts try to update an incidence with another through assignment, however this will only invoke the assignment operator of the common base class.
>
> The following patch adds a helper class which determines the subclass of one pointer through the visitor pattern and then tries to dynamic_cast the other. If this works the assignment is delegated to the subclass' operator=(), otherwise the operation aborts.
>
> Patch contains helper class, respective unittest and changes to ICal resource and KCal resource bridge
>
>
> Diffs
> -----
>
> /trunk/KDE/kdepim/akonadi/resources/ical/CMakeLists.txt 924842
> /trunk/KDE/kdepim/akonadi/resources/ical/icalresource.h 924842
> /trunk/KDE/kdepim/akonadi/resources/ical/icalresource.cpp 924842
> /trunk/KDE/kdepim/kresources/akonadi/kcal/CMakeLists.txt 924842
> /trunk/KDE/kdepim/kresources/akonadi/kcal/resourceakonadi.cpp 924842
> /trunk/KDE/kdepim/libkdepim/CMakeLists.txt 924842
> /trunk/KDE/kdepim/libkdepim/kcalassignmentvisitor.h PRE-CREATION
> /trunk/KDE/kdepim/libkdepim/kcalassignmentvisitor.cpp PRE-CREATION
> /trunk/KDE/kdepim/libkdepim/tests/CMakeLists.txt 924842
> /trunk/KDE/kdepim/libkdepim/tests/kcalassignmenttest.cpp PRE-CREATION
>
> Diff: http://reviewboard.kde.org/r/51/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Kevin
>
>
_______________________________________________
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