diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 405e5e7963..4c24fa0461 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,25 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-01-03 14:07 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbqt/qth/QApplication.qth + * Minor optimizations. + % One static var deleted. + ; TOFIX/TOCHECK: argv/argc usage. + + * contrib/hbqt/qtgui/QApplication.cpp + * contrib/hbqt/hbqt_garbage.h + * Regenerated. + + * contrib/hbxbp/xbpgeneric.prg + - Deleted unused statics. + ; TOFIX: HBQT has an irregularity which I couldn't find a + reason yet. It maintains a pointer to QApplication + in a static variable on C level, plus every HBQT + app maintains a copy of the QApp object in a .prg + level STATIC var. Both are inited using C/prg + level init/exit functions. + 2010-01-03 13:40 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * ChangeLog ! Fixed accindentally committed corrupted file in prev commit. diff --git a/harbour/contrib/hbqt/hbqt_garbage.h b/harbour/contrib/hbqt/hbqt_garbage.h index 20bb15281a..9eadbe5e9d 100644 --- a/harbour/contrib/hbqt/hbqt_garbage.h +++ b/harbour/contrib/hbqt/hbqt_garbage.h @@ -1,14 +1,13 @@ /* * $Id$ - * - * - * -------------------------------------------------------------------- - * WARNING: Automatically generated source file. DO NOT EDIT! - * Instead, edit corresponding .qth file, - * or the generator tool itself, and run regenarate. - * -------------------------------------------------------------------- */ +/* -------------------------------------------------------------------- */ +/* WARNING: Automatically generated source file. DO NOT EDIT! */ +/* Instead, edit corresponding .qth file, */ +/* or the generator tool itself, and run regenarate. */ +/* -------------------------------------------------------------------- */ + extern QT_G_FUNC( hbqt_gcRelease_QAbstractButton ); extern QT_G_FUNC( hbqt_gcRelease_QAbstractItemDelegate ); extern QT_G_FUNC( hbqt_gcRelease_QAbstractItemModel ); diff --git a/harbour/contrib/hbqt/qtgui/QApplication.cpp b/harbour/contrib/hbqt/qtgui/QApplication.cpp index 46ae69f3c0..9beac9ade2 100644 --- a/harbour/contrib/hbqt/qtgui/QApplication.cpp +++ b/harbour/contrib/hbqt/qtgui/QApplication.cpp @@ -91,10 +91,7 @@ #include #include -//void release_codeblocks(); - static QApplication * s_app = NULL; -static bool s_hbqtinit = false; static int s_argc; static char ** s_argv; @@ -114,8 +111,6 @@ HB_FUNC( HB_QT ) {;} static void hbqt_Exit( void * cargo ) { HB_SYMBOL_UNUSED( cargo ); - - //release_codeblocks(); } static void hbqt_Init( void * cargo ) @@ -127,19 +122,15 @@ static void hbqt_Init( void * cargo ) s_app = new QApplication( s_argc, s_argv ); - if( s_app ) - s_hbqtinit = true; - - if( ! s_hbqtinit ) + if( ! s_app ) hb_errInternal( 11001, "hbqt_Init(): QT Initilization Error.", NULL, NULL ); hb_cmdargInit( s_argc, s_argv ); - - hb_vmAtExit( hbqt_Exit, NULL ); } HB_CALL_ON_STARTUP_BEGIN( _hb_hbqt_init_ ) hb_vmAtInit( hbqt_Init, NULL ); + hb_vmAtExit( hbqt_Exit, NULL ); HB_CALL_ON_STARTUP_END( _hb_hbqt_init_ ) #if defined( HB_PRAGMA_STARTUP ) diff --git a/harbour/contrib/hbqt/qth/QApplication.qth b/harbour/contrib/hbqt/qth/QApplication.qth index f2de1e397f..bd2467b71a 100644 --- a/harbour/contrib/hbqt/qth/QApplication.qth +++ b/harbour/contrib/hbqt/qth/QApplication.qth @@ -78,10 +78,7 @@ New = #include #include -//void release_codeblocks(); - static QApplication * s_app = NULL; -static bool s_hbqtinit = false; static int s_argc; static char ** s_argv; @@ -105,8 +102,6 @@ HB_FUNC( QT_QAPPLICATION ) static void hbqt_Exit( void * cargo ) { HB_SYMBOL_UNUSED( cargo ); - - //release_codeblocks(); } static void hbqt_Init( void * cargo ) @@ -118,19 +113,15 @@ static void hbqt_Init( void * cargo ) s_app = new QApplication( s_argc, s_argv ); - if( s_app ) - s_hbqtinit = true; - - if( ! s_hbqtinit ) + if( ! s_app ) hb_errInternal( 11001, "hbqt_Init(): QT Initilization Error.", NULL, NULL ); hb_cmdargInit( s_argc, s_argv ); - - hb_vmAtExit( hbqt_Exit, NULL ); } HB_CALL_ON_STARTUP_BEGIN( _hb_hbqt_init_ ) hb_vmAtInit( hbqt_Init, NULL ); + hb_vmAtExit( hbqt_Exit, NULL ); HB_CALL_ON_STARTUP_END( _hb_hbqt_init_ ) #if defined( HB_PRAGMA_STARTUP ) diff --git a/harbour/contrib/hbxbp/xbpgeneric.prg b/harbour/contrib/hbxbp/xbpgeneric.prg index ff6581f7b8..a5c197e381 100644 --- a/harbour/contrib/hbxbp/xbpgeneric.prg +++ b/harbour/contrib/hbxbp/xbpgeneric.prg @@ -78,27 +78,24 @@ /*----------------------------------------------------------------------*/ STATIC s_oDeskTop -STATIC s_mutex := hb_mutexCreate() STATIC s_oApp -THREAD STATIC t_aEventLoop - THREAD STATIC t_events THREAD STATIC t_nEventIn := 0 THREAD STATIC t_nEventOut := 0 -THREAD STATIC t_oDummy THREAD STATIC t_oAppWindow THREAD STATIC t_oEventLoop +THREAD STATIC t_oXbpInFocus + /*----------------------------------------------------------------------*/ INIT PROCEDURE hbxbp_Start() - t_oDummy := XbpObject():new() - s_oApp := QApplication():new() + s_oApp := QApplication():new() RETURN @@ -106,17 +103,13 @@ INIT PROCEDURE hbxbp_Start() EXIT PROCEDURE hbxbp_End() - t_oDummy := NIL - t_oAppWindow := NIL + t_oAppWindow := NIL IF hb_isObject( s_oDeskTop ) s_oDeskTop:oWidget:pPtr := 0 endif s_oApp:quit() - #if 0 - s_oApp:oWidget:pPtr := 0 - #endif RETURN @@ -227,8 +220,6 @@ FUNCTION SetAppWindow( oXbp ) FUNCTION SetAppFocus( oXbp ) LOCAL oldXbpInFocus - THREAD STATIC t_oXbpInFocus - oldXbpInFocus := t_oXbpInFocus IF hb_isObject( oXbp )