Re: [Harbour] My first study on hbqt code...

2010-04-14 Thread Antonio Maniero
> > > If I understand correctly (correct me if not): > > - You intend to create separate hbqt_gcpointer*() calls for > each object type. > - To add NULL checking to these functions. > > I agree with both. HBQT code should definitely throw RTE when > NULL is detected, instead of letting it GPF. > >

Re: [Harbour] My first study on hbqt code...

2010-04-11 Thread francesco perillo
It seems that I'm looking in the right direction And this one ? >> I also do not see any protection against wrong object casting and >> raw pointer items are accepted what effectively blocks any serious >> cleanups. Few months ago I sent code example which adds such protection >> to this list

Re: [Harbour] My first study on hbqt code...

2010-04-11 Thread Viktor Szakáts
On 2010 Apr 11, at 10:23, francesco perillo wrote: >> Yes. Plus check TOFIX notes in HBQT code, and it's >> worth to carefully read Przemek's recent quick summary >> of HBQT problems, there are some important issues >> raised there which may help finding the right direction. >> (f.e. confusing/mix

Re: [Harbour] My first study on hbqt code...

2010-04-11 Thread francesco perillo
> Yes. Plus check TOFIX notes in HBQT code, and it's > worth to carefully read Przemek's recent quick summary > of HBQT problems, there are some important issues > raised there which may help finding the right direction. > (f.e. confusing/mixing raw pointers with GC collected > ones, which is anoth

Re: [Harbour] My first study on hbqt code...

2010-04-11 Thread Viktor Szakáts
> 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 So such change can do no harm and should be done to prove this statement of Pritpal and avoid any future misunderstandings in this regard. But, I doubt cur

Re: [Harbour] My first study on hbqt code...

2010-04-11 Thread francesco perillo
> 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)

Re: [Harbour] My first study on hbqt code...

2010-04-10 Thread Viktor Szakáts
Hi Francesco, > In the objects destructor ( the hbqt_gcRelease_* functions ) pq value > is checked against NULL... But in hbqt_gcpointer it is not... because > in hbqt_gcpointer we just have a "generic" QGC_POINTER and not the > "specific" QGC_POINTER_QPushButton so pq is not "available"... > See:

[Harbour] My first study on hbqt code...

2010-04-10 Thread francesco perillo
Let's start with "qtgui/QPushButton.cpp" HB_FUNC( QT_QPUSHBUTTON_SETAUTODEFAULT ) { hbqt_par_QPushButton( 1 )->setAutoDefault( hb_parl( 2 ) ); } Since #define hbqt_par_QPushButton( n ) ( ( QPushButton * ) hbqt_gcpointer( n ) ) this line: hbqt_par_QPushButton( 1