On 7. des. 2011, at 17.22, ext Thiago Macieira wrote:
> On Wednesday, 7 de December de 2011 09.12.39, Olivier Goffart wrote:
>>> * QObject::connect needs to be able to take a QSharedPointer<QObject>
>>> * QObject::connect needs to be able to take a QWeakPointer<QObject>
>> 
>> I don't understand this point: you can just pass the pointer.data() to 
>> QObject::connect, and QObject::connect automatically take care of 
>> disconnecting when the object is destroyed.
> 
> You can. This is just for convenience.

It should be fairly simple to add an *inline* templated connect function that 
takes a pointer-like type, unwraps the actual pointer and calls the "real" 
connect. (e.g., using something like boost::get_pointer and hooking our pointer 
classes to it as well)

Cheers,


João

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to