Use of Boost library classes in kdecore?
Thomas Zander
zander at kde.org
Sun Jul 8 09:57:52 BST 2007
On Sunday 08 July 2007 00:20:36 David Jarvie wrote:
> > I'll go for the ref-counted d-pointer instead. Because there will no
> > longer be any need to cope with implicit conversions of ref-counted
> > classes, it should hopefully be possible to implement it using
> > QExplicitlySharedDataPointer as Thiago suggested.
>
> Having looked at implementing this, I realise that it won't work. The
> KTimeZone base class objects provided by the API must be polymorphic,
Maybe I'm misunderstanding your requirements; but I don't see why it can't
work. To avoid long discussions; can you look at this
mock-implementation I just quickly did ?
It uses refcounted d-pointers and seems to do what you require.
See the main() for what I mean;
FileTimeZone ftz;
TimeZone tz = ftz;
FileTimeZone ftz2 = tz;
This compiles; and altering a setter on any of the 3 will immediately
alter it on the other two as well.
Cheers!
--
Thomas Zander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: time.tgz
Type: application/x-tgz
Size: 1256 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070708/b94dc404/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070708/b94dc404/attachment.sig>
More information about the kde-core-devel
mailing list