[Kde-pim] Akonadi attribute oddities
David Jarvie
djarvie at kde.org
Wed Dec 23 01:09:52 GMT 2009
On Tuesday 22 Dec 2009 14:11:57 Stephen Kelly wrote:
> David Jarvie wrote:
>
> > In addition to that, AFAICS, addAttribute() called with the existing
> > Attribute as a parameter will first delete any existing Attribute (which
> > happens to be the same one as in the parameter), and then add the (now
> > deleted) Attribute back into the Entity. So addAttribute() should first
> > check whether the supplied Attribute is the same as the one it already
> > holds, and if so, do nothing. Or am I missing something?
> >
>
> Yes, I don't see why the call to addAttribute wasn't crashing all the time.
> The check for setting the current attribute might be a good idea. Care to
> write that and a unit test for it?
Done - see http://reviewboard.kde.org/r/2444/.
> Thanks for the review and keep it coming. I'll try to get around to adding
> more dox about entityData. Generally the ETM tries to do everything it can
> in data, and for type-specific stuff, like figuring out what the email
> subject or sender, or the addressee name or email address, it delegates to
> the subclass. That might not hold water in all cases, but it was the initial
> intention. I'll investigate a bit more of what it currently does.
I did get the impression that it might not be totally straightforward to define the difference between the two methods, so thanks for looking at it.
--
David Jarvie.
KDE developer.
KAlarm author -- 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