> If I understand correctly (correct me if not):
>
> - You intend to create separate hbqt_gcpointer*() calls for
> each object type.

No,  my proposal 1) has just 2 functions, one hbqt_gcpointer for Qt
objects that don't have pq and one hbqt_gcpointer_has_pq for objects
that have one... Proposal 2) keeps only one function but uses bNew to
store if pq is valid or not. Proposal 3) stress it more using QPointer
in place of ph to streamline some routine...

> - To add NULL checking to these functions.

Yes. But Pritpal says that we don't have such cases and the problem is
only in destructor... Infact I proposed that bNew status bits to
better trace what happens...

-------------------------------

I was also thinking about the possibility of eliminating all the
QGC_POINTER_Q* structures at all and just use QGC_POINTER but with the
addition of pq and bNews used as status... It would add 4 bytes to
each Qt object

All QGC_POINTER_Q* I examined are equal to QGC_POINTER or to
QGC_POINTER plus pq member... I only don't know if it is possibile to
have a "generic" definition
 QPointer< * > pq;

So I believe that each QGC_POINTER_Q* that has no pq member can become
a QGC_POINTER, while for the others that have the pq member a C++
expert should tell if QPointer< * > pq; is supported.

I found also a case where QGC_POINTER_QHttpResponseHeader is defined,
but a standard QGC_pointer is used....


Francesco
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to