[Telepathy] tq-qt4 refcount proposal

Ian Monroe ian.monroe at collabora.co.uk
Mon Mar 23 08:35:11 PDT 2009


On Monday 23 March 2009 10:04:02 Andre Moreira Magalhaes wrote:
> The biggest problem here is that you can't forward declare typedefs, so
> that would be quite difficult.
> You could declare typedef AccountPtr on account.h and typedef
> AccountManagerPtr on account-manager.h and both headers have to include
> the other, so this wouldn't work.
>
> Solutions:
> 1 - Have a header that defines all XXXPtr typedefs.
> 2 - Instead of using typedefs making the XXXPtr a class inherited from
> QExplicitlySharedDataPointer<XXX> and forward declare it.
> 3 - Do not use typedefs at all, always use
> QExplicitlySharedDataPointer<XXX> or SharedPtr<XXX> as I did.
> 4 - ???

Well so the AccountManager header itself might not use the 'AccountPtr', but 
the .cpp files and all the users code could use it still. I'm guessing there's 
some Doxygen trickery that could be preformed so that the docs still show 
'AccountPtr'.

Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/telepathy/attachments/20090323/1bf121b7/attachment.pgp 


More information about the telepathy mailing list