diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 787206b8bd..73fd489321 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,14 @@ The license applies to all entries newer than 2009-04-28. */ +2010-09-21 09:39 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtgui/g/QMenu.cpp + * Re-generated. + + * contrib/hbqt/qtgui/qth/QMenu.qth + ! A try to fix error reported on some builds. + I am not sure if this is the cause but let us try. + 2010-09-21 19:10 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * harbour/contrib/rddsql/sqlbase.c ! fixed connection freeing in RDDI_DISCONNECT diff --git a/harbour/contrib/hbqt/qtgui/g/QMenu.cpp b/harbour/contrib/hbqt/qtgui/g/QMenu.cpp index 52a105dd6d..3bfd8a3df6 100644 --- a/harbour/contrib/hbqt/qtgui/g/QMenu.cpp +++ b/harbour/contrib/hbqt/qtgui/g/QMenu.cpp @@ -174,11 +174,11 @@ HB_FUNC( QT_QMENU ) if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) ) { - pObj = new QMenu( hbqt_par_QString( 1 ), hbqt_par_QWidget( 2 ) ) ; + pObj = new QMenu( hbqt_par_QString( 1 ), HB_ISPOINTER( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ) ; } else { - pObj = new QMenu( hbqt_par_QWidget( 1 ) ) ; + pObj = new QMenu( HB_ISPOINTER( 1 ) ? hbqt_par_QWidget( 1 ) : 0 ) ; } hb_retptrGC( hbqt_gcAllocate_QMenu( ( void * ) pObj, true ) ); @@ -268,11 +268,11 @@ HB_FUNC( QT_QMENU_ADDMENU ) QMenu * p = hbqt_par_QMenu( 1 ); if( p ) { - void * pText; - if( hb_pcount() == 2 && HB_ISCHAR( 2 ) ) { + void * pText; hb_retptrGC( hbqt_gcAllocate_QMenu( ( p )->addMenu( hb_parstr_utf8( 2, &pText, NULL ) ), false ) ); + hb_strfree( pText ); } else if( hb_pcount() == 2 && HB_ISPOINTER( 2 ) ) { @@ -280,11 +280,8 @@ HB_FUNC( QT_QMENU_ADDMENU ) } else if( hb_pcount() == 3 ) { + void * pText; hb_retptrGC( hbqt_gcAllocate_QMenu( ( p )->addMenu( ( HB_ISCHAR( 2 ) ? QIcon( hbqt_par_QString( 2 ) ) : *hbqt_par_QIcon( 2 )), hb_parstr_utf8( 3, &pText, NULL ) ), false ) ); - } - - if( pText ) - { hb_strfree( pText ); } } diff --git a/harbour/contrib/hbqt/qtgui/qth/QMenu.qth b/harbour/contrib/hbqt/qtgui/qth/QMenu.qth index d4db0924f5..46aafa5eec 100644 --- a/harbour/contrib/hbqt/qtgui/qth/QMenu.qth +++ b/harbour/contrib/hbqt/qtgui/qth/QMenu.qth @@ -72,11 +72,11 @@ HB_FUNC( QT_QMENU ) { if( hb_pcount() >= 1 && HB_ISCHAR( 1 ) ) { - hb_retptr( ( QMenu* ) new QMenu( hbqt_par_QString( 1 ), hbqt_par_QWidget( 2 ) ) ); + hb_retptr( new QMenu( hbqt_par_QString( 1 ), HB_ISPOINTER( 2 ) ? hbqt_par_QWidget( 2 ) : 0 ) ); } else { - hb_retptr( ( QMenu* ) new QMenu( hbqt_par_QWidget( 1 ) ) ); + hb_retptr( new QMenu( HB_ISPOINTER( 1 ) ? hbqt_par_QWidget( 1 ) : 0 ) ); } } @@ -131,11 +131,11 @@ QMenu * addMenu ( ... ){ QMenu * p = hbqt_par_QMenu( 1 ); if( p ) { - void * pText; - if( hb_pcount() == 2 && HB_ISCHAR( 2 ) ) { + void * pText; hb_retptrGC( hbqt_gcAllocate_QMenu( ( p )->addMenu( hb_parstr_utf8( 2, &pText, NULL ) ), false ) ); + hb_strfree( pText ); } else if( hb_pcount() == 2 && HB_ISPOINTER( 2 ) ) { @@ -143,11 +143,8 @@ QMenu * addMenu ( ... ){ } else if( hb_pcount() == 3 ) { + void * pText; hb_retptrGC( hbqt_gcAllocate_QMenu( ( p )->addMenu( ( HB_ISCHAR( 2 ) ? QIcon( hbqt_par_QString( 2 ) ) : *hbqt_par_QIcon( 2 )), hb_parstr_utf8( 3, &pText, NULL ) ), false ) ); - } - - if( pText ) - { hb_strfree( pText ); } }