SmartPointerList
Thiago Macieira
thiago at kde.org
Wed Jan 13 09:05:40 GMT 2010
Em Quarta-feira 13 Janeiro 2010, às 00:07:01, Ingo Klöcker escreveu:
> Thanks a lot for the explanation, Thiago! It's very much appreciated. I
> guess tomorrow I'll write a bug to replace all QPointers by
> QWeakPointers once we depend on Qt 4.6. (No, I'm not talking about
> KDE. :-) )
Remember that QWeakPointer has no operator-> by default.
That's a protection mechanism, because QWeakPointer doesn't guarantee that the
pointer will remain valid.
However, if you want, you can:
#define SHOOT_MYSELF_IN_THE_FOOT
oops, I mean:
#define QWEAKPOINTER_ENABLE_ARROW
And then you have operator->().
You still don't have operator T*().
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100113/21f367ee/attachment.sig>
More information about the kde-core-devel
mailing list