[Kde-pim] KCalCore Ptr typedefs and constness

David Jarvie djarvie at kde.org
Sun Aug 22 18:26:33 BST 2010


On Saturday 21 August 2010 23:46:31 Ingo Klöcker wrote:
> Anyway, I don't see the need to change anything if introducing ConstPtr 
> is not an option (I don't have an opinion about this because I don't 
> know enough of the API). The semantics of const Event::Ptr& is probably 
> not immediately obvious if one sees this (standard C++) construct for 
> the first time but one will learn the semantics very quickly.

In other words, we can only rely on convention and the good behaviour of the coder to respect the constness of objects passed via their pointers. It's a step backwards from the old kcal interface in this respect, where the compiler enforced no modifications on direct members of the const object.

Using the standard kcalcore API, there's now no way to indicate whether objects passed via pointers are const or not.

-- 
David Jarvie.
KDE developer.
KAlarm author -- http://www.astrojar.org.uk/kalarm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100822/52519cb6/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