From 5275f128cdbf7e4d8b48f237bcd53ced1282f0aa Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Sat, 19 Mar 2011 06:10:29 +0000 Subject: [PATCH] 2011-03-18 23:06 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtcore/hbqt_hbqevents.cpp * contrib/hbqt/qtcore/hbqt_hbqslots.cpp * contrib/hbqt/qtcore/hbqt_misc.prg * contrib/hbqt/qtgui/hbqt_init.cpp ! FIXED: GPF at exit and sometimes along running application. Harbourearns, it is day to cheer. --- harbour/ChangeLog | 8 ++++++++ harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp | 8 +++++--- harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp | 8 +++++--- harbour/contrib/hbqt/qtcore/hbqt_misc.prg | 2 ++ harbour/contrib/hbqt/qtgui/hbqt_init.cpp | 7 +------ 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8dc9f00bef..f23aa96d54 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,14 @@ The license applies to all entries newer than 2009-04-28. */ +2011-03-18 23:06 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtcore/hbqt_hbqevents.cpp + * contrib/hbqt/qtcore/hbqt_hbqslots.cpp + * contrib/hbqt/qtcore/hbqt_misc.prg + * contrib/hbqt/qtgui/hbqt_init.cpp + ! FIXED: GPF at exit and sometimes along running application. + Harbourearns, it is day to cheer. + 2011-03-19 06:59 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/filesys.c ! added protection for potentially unfinished due to signal diff --git a/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp b/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp index 2cd99a88bd..fd154d5d4b 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp +++ b/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp @@ -295,9 +295,11 @@ HB_FUNC( __HBQT_EVENTS_DISCONNECT ) { object->setProperty( prop, QVariant() ); - hb_itemRelease( t_events->listBlock.at( i - 1 ) ); - t_events->listBlock[ i - 1 ] = NULL; - + if( t_events->listBlock[ i - 1 ] != NULL ) + { + hb_itemRelease( t_events->listBlock.at( i - 1 ) ); + t_events->listBlock[ i - 1 ] = NULL; + } nResult = 0; HB_TRACE( HB_TR_DEBUG, ( " QT_EVENTS_DISCONNECT: %i", type ) ); diff --git a/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp b/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp index 7b3bdc793f..ae1bd48086 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp +++ b/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp @@ -315,9 +315,11 @@ HB_FUNC( __HBQT_SLOTS_DISCONNECT ) else nResult = 4; - hb_itemRelease( t_slots->listBlock.at( i - 1 ) ); - - t_slots->listBlock[ i - 1 ] = NULL; + if( t_slots->listBlock.at( i - 1 ) != NULL ) + { + hb_itemRelease( t_slots->listBlock.at( i - 1 ) ); + t_slots->listBlock[ i - 1 ] = NULL; + } } else nResult = 3; diff --git a/harbour/contrib/hbqt/qtcore/hbqt_misc.prg b/harbour/contrib/hbqt/qtcore/hbqt_misc.prg index cb8b4af46c..2d6675be58 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_misc.prg +++ b/harbour/contrib/hbqt/qtcore/hbqt_misc.prg @@ -129,6 +129,8 @@ STATIC FUNCTION HBQEventsFromPointer( ... ) NEXT RETURN HB_HBQEvents():fromPointer( ... ) +/*----------------------------------------------------------------------*/ + METHOD HbQtObjectHandler:connect( cnEvent, bBlock ) LOCAL nResult diff --git a/harbour/contrib/hbqt/qtgui/hbqt_init.cpp b/harbour/contrib/hbqt/qtgui/hbqt_init.cpp index 4beebe80c2..cb23620b59 100644 --- a/harbour/contrib/hbqt/qtgui/hbqt_init.cpp +++ b/harbour/contrib/hbqt/qtgui/hbqt_init.cpp @@ -628,7 +628,7 @@ static void hbqt_lib_init( void * cargo ) hb_errInternal( 11001, "hbqt_lib_init(): HBQTGUI Initilization Error.", NULL, NULL ); hb_cmdargInit( s_argc, s_argv ); - HB_TRACE( HB_TR_ALWAYS, ( "hbqt_lib_init %p", s_app ) ); + HB_TRACE( HB_TR_DEBUG, ( "hbqt_lib_init %p", s_app ) ); hbqt_registerCallbacks(); } @@ -636,11 +636,6 @@ static void hbqt_lib_init( void * cargo ) static void hbqt_lib_exit( void * cargo ) { HB_SYMBOL_UNUSED( cargo ); - HB_TRACE( HB_TR_ALWAYS, ( "hbqt_lib_exit 0" ) ); - s_app->exit( 0 ); - HB_TRACE( HB_TR_ALWAYS, ( "hbqt_lib_exit 1" ) ); - delete s_app; - HB_TRACE( HB_TR_ALWAYS, ( "hbqt_lib_exit 2" ) ); }