From dd3b0805a3151b11d7c7f5279cdb11fdd89668cb Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 18 Dec 2009 08:59:17 +0000 Subject: [PATCH] 2009-12-18 09:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/hbqt_hbdbfmodel.cpp * contrib/hbqt/generator/hbqtgen.prg * contrib/hbqt/hbqt_hbqtableview.cpp * contrib/hbqt/hbqt.h * contrib/hbqt/hbqt_destruct.cpp * contrib/hbqt/hbqt_hbqmainwindow.cpp * contrib/hbqt/hbqt_base.cpp ! Fixed gcFuncs() to be named hbqt_gcFuncs(). This is a public function, please remember to prefix all public functions to have a lib specific prefix. ; TODO: Regenerate. --- harbour/ChangeLog | 16 ++++++++++++++-- harbour/contrib/hbqt/generator/hbqtgen.prg | 6 +++--- harbour/contrib/hbqt/hbqt.h | 2 +- harbour/contrib/hbqt/hbqt_base.cpp | 2 +- harbour/contrib/hbqt/hbqt_destruct.cpp | 4 ++-- harbour/contrib/hbqt/hbqt_hbdbfmodel.cpp | 2 +- harbour/contrib/hbqt/hbqt_hbqmainwindow.cpp | 2 +- harbour/contrib/hbqt/hbqt_hbqtableview.cpp | 2 +- 8 files changed, 24 insertions(+), 12 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bb2867a767..467934bda7 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,19 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-18 09:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbqt/hbqt_hbdbfmodel.cpp + * contrib/hbqt/generator/hbqtgen.prg + * contrib/hbqt/hbqt_hbqtableview.cpp + * contrib/hbqt/hbqt.h + * contrib/hbqt/hbqt_destruct.cpp + * contrib/hbqt/hbqt_hbqmainwindow.cpp + * contrib/hbqt/hbqt_base.cpp + ! Fixed gcFuncs() to be named hbqt_gcFuncs(). This is a + public function, please remember to prefix all public functions + to have a lib specific prefix. + ; TODO: Regenerate. + 2009-12-18 09:47 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL + Added direct link to QT Windows 4.5.3 pkg. @@ -35,8 +48,7 @@ ! Added one missing 'extern' keyword. + Added TOFIX for QT_HBQTABLEVIEW_NAVIGATE() which has a remaining leak of one typical type. - ; TOFIX: Do the same with gcFuncs(). - ; TODO: Regenerate. + ; TOFIX: Do the same with gcFuncs(). [DONE] 2009-12-17 22:24 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/hbide.prg diff --git a/harbour/contrib/hbqt/generator/hbqtgen.prg b/harbour/contrib/hbqt/generator/hbqtgen.prg index f3bdfdf8b8..873c1d17c6 100644 --- a/harbour/contrib/hbqt/generator/hbqtgen.prg +++ b/harbour/contrib/hbqt/generator/hbqtgen.prg @@ -650,9 +650,9 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc ) aadd( cpp_, "void * hbqt_gcAllocate_" + cWidget + "( void * pObj )" ) aadd( cpp_, "{ " ) IF lObject - aadd( cpp_, " QGC_POINTER_" + cWidget + " * p = ( QGC_POINTER_" + cWidget + " * ) hb_gcAllocate( sizeof( QGC_POINTER_" + cWidget + " ), gcFuncs() );" ) + aadd( cpp_, " QGC_POINTER_" + cWidget + " * p = ( QGC_POINTER_" + cWidget + " * ) hb_gcAllocate( sizeof( QGC_POINTER_" + cWidget + " ), hbqt_gcFuncs() );" ) ELSE - aadd( cpp_, " QGC_POINTER * p = ( QGC_POINTER * ) hb_gcAllocate( sizeof( QGC_POINTER ), gcFuncs() );" ) + aadd( cpp_, " QGC_POINTER * p = ( QGC_POINTER * ) hb_gcAllocate( sizeof( QGC_POINTER ), hbqt_gcFuncs() );" ) ENDIF aadd( cpp_, " " ) aadd( cpp_, " p->ph = pObj;" ) @@ -698,7 +698,7 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc ) aadd( cpp_, new_[ 2 ] ) // { IF lConst IF lDestructor - aadd( cpp_, " QGC_POINTER * p = ( QGC_POINTER * ) hb_gcAllocate( sizeof( QGC_POINTER ), gcFuncs() );" ) + aadd( cpp_, " QGC_POINTER * p = ( QGC_POINTER * ) hb_gcAllocate( sizeof( QGC_POINTER ), hbqt_gcFuncs() );" ) ENDIF IF lObject aadd( cpp_, " QPointer< "+ cWidget +" > pObj = NULL;" ) diff --git a/harbour/contrib/hbqt/hbqt.h b/harbour/contrib/hbqt/hbqt.h index 1a241dc053..8d9f009098 100644 --- a/harbour/contrib/hbqt/hbqt.h +++ b/harbour/contrib/hbqt/hbqt.h @@ -79,7 +79,7 @@ extern int hbqt_get_object_release_method(); HB_GARBAGE_FUNC( Q_release ); extern void * hbqt_gcpointer( int iParam ); -extern const HB_GC_FUNCS * gcFuncs( void ); /* TOFIX: prefix: hbqt_ */ +extern const HB_GC_FUNCS * hbqt_gcFuncs( void ); extern int hbqt_getmemused( void ); diff --git a/harbour/contrib/hbqt/hbqt_base.cpp b/harbour/contrib/hbqt/hbqt_base.cpp index 7853f59664..43805efec3 100644 --- a/harbour/contrib/hbqt/hbqt_base.cpp +++ b/harbour/contrib/hbqt/hbqt_base.cpp @@ -79,7 +79,7 @@ HB_FUNC( QT_FINDCHILD ) HB_FUNC( HBQT_ISEQUALGCQTPOINTER ) { - QGC_POINTER * p = ( QGC_POINTER * ) hb_parptrGC( gcFuncs(), 1 ); + QGC_POINTER * p = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), 1 ); if( p && p->ph ) hb_retl( p->ph == hb_parptr( 2 ) ); diff --git a/harbour/contrib/hbqt/hbqt_destruct.cpp b/harbour/contrib/hbqt/hbqt_destruct.cpp index 77a7b1f3f7..82c114a5ad 100644 --- a/harbour/contrib/hbqt/hbqt_destruct.cpp +++ b/harbour/contrib/hbqt/hbqt_destruct.cpp @@ -75,14 +75,14 @@ const HB_GC_FUNCS QT_gcFuncs = hb_gcDummyMark }; -const HB_GC_FUNCS * gcFuncs( void ) +const HB_GC_FUNCS * hbqt_gcFuncs( void ) { return &QT_gcFuncs; } void * hbqt_gcpointer( int iParam ) { - QGC_POINTER * p = ( QGC_POINTER * ) hb_parptrGC( gcFuncs(), iParam ); + QGC_POINTER * p = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), iParam ); if( p && p->ph ) return p->ph; diff --git a/harbour/contrib/hbqt/hbqt_hbdbfmodel.cpp b/harbour/contrib/hbqt/hbqt_hbdbfmodel.cpp index 20dd8e7b17..dd50554b09 100644 --- a/harbour/contrib/hbqt/hbqt_hbdbfmodel.cpp +++ b/harbour/contrib/hbqt/hbqt_hbdbfmodel.cpp @@ -353,7 +353,7 @@ QT_G_FUNC( hbqt_release_HBDbfModel ) void * hbqt_gcAllocate_HBDbfModel( void * pObj ) { - QGC_POINTER_HBDbfModel * p = ( QGC_POINTER_HBDbfModel * ) hb_gcAllocate( sizeof( QGC_POINTER_HBDbfModel ), gcFuncs() ); + QGC_POINTER_HBDbfModel * p = ( QGC_POINTER_HBDbfModel * ) hb_gcAllocate( sizeof( QGC_POINTER_HBDbfModel ), hbqt_gcFuncs() ); p->ph = pObj; p->func = hbqt_release_HBDbfModel; diff --git a/harbour/contrib/hbqt/hbqt_hbqmainwindow.cpp b/harbour/contrib/hbqt/hbqt_hbqmainwindow.cpp index 0ea3361ddc..041370f82e 100644 --- a/harbour/contrib/hbqt/hbqt_hbqmainwindow.cpp +++ b/harbour/contrib/hbqt/hbqt_hbqmainwindow.cpp @@ -376,7 +376,7 @@ QT_G_FUNC( release_HBQMainWindow ) void * hbqt_gcAllocate_HBQMainWindow( void * pObj ) { - QGC_POINTER_HBQMainWindow * p = ( QGC_POINTER_HBQMainWindow * ) hb_gcAllocate( sizeof( QGC_POINTER_HBQMainWindow ), gcFuncs() ); + QGC_POINTER_HBQMainWindow * p = ( QGC_POINTER_HBQMainWindow * ) hb_gcAllocate( sizeof( QGC_POINTER_HBQMainWindow ), hbqt_gcFuncs() ); p->ph = pObj; p->func = release_HBQMainWindow; diff --git a/harbour/contrib/hbqt/hbqt_hbqtableview.cpp b/harbour/contrib/hbqt/hbqt_hbqtableview.cpp index 80667accff..a7859e7ac4 100644 --- a/harbour/contrib/hbqt/hbqt_hbqtableview.cpp +++ b/harbour/contrib/hbqt/hbqt_hbqtableview.cpp @@ -175,7 +175,7 @@ QT_G_FUNC( release_HBQTableView ) void * hbqt_gcAllocate_HBQTableView( void * pObj ) { - QGC_POINTER_HBQTableView * p = ( QGC_POINTER_HBQTableView * ) hb_gcAllocate( sizeof( QGC_POINTER_HBQTableView ), gcFuncs() ); + QGC_POINTER_HBQTableView * p = ( QGC_POINTER_HBQTableView * ) hb_gcAllocate( sizeof( QGC_POINTER_HBQTableView ), hbqt_gcFuncs() ); p->ph = pObj; p->func = release_HBQTableView;