From e404195f369a59baf84d16211ebeba906c9c628d Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 15 Nov 2009 08:44:27 +0000 Subject: [PATCH] 2009-11-15 09:43 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/hbqt.h * contrib/hbqt/generator/hbqtgen.prg * contrib/hbqt/hbqt.ch * contrib/hbqt/hbqt_destruct.cpp * contrib/hbqt/tests/demoqt.prg * contrib/hbqt/hbqt_slots.cpp * contrib/hbqt/Makefile * contrib/hbxbp/xbpappevent.prg * contrib/hbxbp/xbpsle.prg * contrib/hbxbp/xbplistbox.prg * contrib/hbxbp/xbppresspace.prg * contrib/hbxbp/xbpcheckbox.prg * contrib/hbxbp/xbpmenubar.prg * contrib/hbxbp/xbpradiobutton.prg * contrib/hbxbp/xbprtf.prg * contrib/hbxbp/xbpfiledialog.prg * contrib/hbxbp/tests/demoxbp.prg * contrib/hbxbp/xbpbrowse.prg * contrib/hbxbp/xbptabpage.prg * contrib/hbxbp/xbpwindow.prg * contrib/hbxbp/xbpcombobox.prg * contrib/hbxbp/xbpstatusbar.prg * contrib/hbxbp/xbppushbutton.prg * contrib/hbxbp/xbpprintdialog.prg * contrib/hbxbp/xbpbitmap.prg * contrib/hbxbp/xbp.ch * contrib/hbxbp/xbpprinter.prg * contrib/hbxbp/xbpscrollbar.prg * contrib/hbxbp/xbpfontdialog.prg * contrib/hbxbp/xbphtmlviewer.prg * contrib/hbxbp/xbpstatic.prg * contrib/hbxbp/xbptreeview.prg * contrib/hbxbp/xbpdialog.prg * contrib/hbxbp/xbpstyle.prg * contrib/hbxbp/xbptoolbar.prg * contrib/hbxbp/xbp3state.prg * contrib/hbxbp/xbpspinbutton.prg * contrib/hbxbp/xbpdataref.prg * contrib/hbxbp/xbpgeneric.prg * contrib/hbxbp/xbpmle.prg ! Fixed to include hbqt.ch from xbp.ch instead of doing it in each file manually. * Renamed __debug__ to __HB_DEBUG__ ! Fixed just_debug() to work in UNICODE mode. * Renamed hb_getMemUsed() to hbqt_getmemused() * Renamed just_debug() to hbqt_debug() + Added multiple parameter support to HB_OUTDEBUG(). * Renamed HB_OUTDEBUG() to HBQT_DEBUG() in hbqt and HBXBP_DEBUG() in hbxbp. ! Fixed #include to #include . ! Replaced all debug calls to use HBQT_DEBUG() / HBXBP_DEBUG(). ; NOTE: After this change __HB_DEBUG__ controls debug mode in both .c and .prg mode. Windows specific debug output can still be enabled with __HB_WINDEBUG__. ; NOTE: I didn't test any of these. Pls do so. ; NOTE: All above is temporary as it would be better add OutputDebugString() support to our RTL trace engine (enabled with a flag), plus multiple parameter support (preferably accepting any types) to HB_TRACESTRING(). Since my .c skill would kill this effort, or at least make it quite bumpy, I'd kindly ask someone (Przemek, are you there? ;) to implement it. Preferably both. ; TODO: Regenerate all hbqt sources. --- harbour/ChangeLog | 61 ++++++++++++++++ harbour/contrib/hbqt/Makefile | 3 + harbour/contrib/hbqt/generator/hbqtgen.prg | 40 +++++------ harbour/contrib/hbqt/hbqt.ch | 10 +-- harbour/contrib/hbqt/hbqt.h | 7 +- harbour/contrib/hbqt/hbqt_destruct.cpp | 42 +++++++---- harbour/contrib/hbqt/hbqt_slots.cpp | 82 +++++++++++----------- harbour/contrib/hbqt/tests/demoqt.prg | 22 +++--- harbour/contrib/hbxbp/tests/demoxbp.prg | 43 ++++++------ harbour/contrib/hbxbp/xbp.ch | 12 ++-- harbour/contrib/hbxbp/xbp3state.prg | 1 - harbour/contrib/hbxbp/xbpappevent.prg | 3 +- harbour/contrib/hbxbp/xbpbitmap.prg | 1 - harbour/contrib/hbxbp/xbpbrowse.prg | 13 ++-- harbour/contrib/hbxbp/xbpcheckbox.prg | 1 - harbour/contrib/hbxbp/xbpcombobox.prg | 1 - harbour/contrib/hbxbp/xbpdataref.prg | 3 +- harbour/contrib/hbxbp/xbpdialog.prg | 1 - harbour/contrib/hbxbp/xbpfiledialog.prg | 1 - harbour/contrib/hbxbp/xbpfontdialog.prg | 1 - harbour/contrib/hbxbp/xbpgeneric.prg | 68 ++++++------------ harbour/contrib/hbxbp/xbphtmlviewer.prg | 3 +- harbour/contrib/hbxbp/xbplistbox.prg | 1 - harbour/contrib/hbxbp/xbpmenubar.prg | 5 +- harbour/contrib/hbxbp/xbpmle.prg | 1 - harbour/contrib/hbxbp/xbppresspace.prg | 1 - harbour/contrib/hbxbp/xbpprintdialog.prg | 1 - harbour/contrib/hbxbp/xbpprinter.prg | 1 - harbour/contrib/hbxbp/xbppushbutton.prg | 1 - harbour/contrib/hbxbp/xbpradiobutton.prg | 1 - harbour/contrib/hbxbp/xbprtf.prg | 1 - harbour/contrib/hbxbp/xbpscrollbar.prg | 1 - harbour/contrib/hbxbp/xbpsle.prg | 3 +- harbour/contrib/hbxbp/xbpspinbutton.prg | 3 +- harbour/contrib/hbxbp/xbpstatic.prg | 1 - harbour/contrib/hbxbp/xbpstatusbar.prg | 1 - harbour/contrib/hbxbp/xbpstyle.prg | 1 - harbour/contrib/hbxbp/xbptabpage.prg | 5 +- harbour/contrib/hbxbp/xbptoolbar.prg | 1 - harbour/contrib/hbxbp/xbptreeview.prg | 5 +- harbour/contrib/hbxbp/xbpwindow.prg | 15 ++-- 41 files changed, 240 insertions(+), 228 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 75fb807da1..e547aa80ba 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,67 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-15 09:43 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbqt/hbqt.h + * contrib/hbqt/generator/hbqtgen.prg + * contrib/hbqt/hbqt.ch + * contrib/hbqt/hbqt_destruct.cpp + * contrib/hbqt/tests/demoqt.prg + * contrib/hbqt/hbqt_slots.cpp + * contrib/hbqt/Makefile + * contrib/hbxbp/xbpappevent.prg + * contrib/hbxbp/xbpsle.prg + * contrib/hbxbp/xbplistbox.prg + * contrib/hbxbp/xbppresspace.prg + * contrib/hbxbp/xbpcheckbox.prg + * contrib/hbxbp/xbpmenubar.prg + * contrib/hbxbp/xbpradiobutton.prg + * contrib/hbxbp/xbprtf.prg + * contrib/hbxbp/xbpfiledialog.prg + * contrib/hbxbp/tests/demoxbp.prg + * contrib/hbxbp/xbpbrowse.prg + * contrib/hbxbp/xbptabpage.prg + * contrib/hbxbp/xbpwindow.prg + * contrib/hbxbp/xbpcombobox.prg + * contrib/hbxbp/xbpstatusbar.prg + * contrib/hbxbp/xbppushbutton.prg + * contrib/hbxbp/xbpprintdialog.prg + * contrib/hbxbp/xbpbitmap.prg + * contrib/hbxbp/xbp.ch + * contrib/hbxbp/xbpprinter.prg + * contrib/hbxbp/xbpscrollbar.prg + * contrib/hbxbp/xbpfontdialog.prg + * contrib/hbxbp/xbphtmlviewer.prg + * contrib/hbxbp/xbpstatic.prg + * contrib/hbxbp/xbptreeview.prg + * contrib/hbxbp/xbpdialog.prg + * contrib/hbxbp/xbpstyle.prg + * contrib/hbxbp/xbptoolbar.prg + * contrib/hbxbp/xbp3state.prg + * contrib/hbxbp/xbpspinbutton.prg + * contrib/hbxbp/xbpdataref.prg + * contrib/hbxbp/xbpgeneric.prg + * contrib/hbxbp/xbpmle.prg + ! Fixed to include hbqt.ch from xbp.ch instead of doing it in each file manually. + * Renamed __debug__ to __HB_DEBUG__ + ! Fixed just_debug() to work in UNICODE mode. + * Renamed hb_getMemUsed() to hbqt_getmemused() + * Renamed just_debug() to hbqt_debug() + + Added multiple parameter support to HB_OUTDEBUG(). + * Renamed HB_OUTDEBUG() to HBQT_DEBUG() in hbqt and HBXBP_DEBUG() in hbxbp. + ! Fixed #include to #include . + ! Replaced all debug calls to use HBQT_DEBUG() / HBXBP_DEBUG(). + ; NOTE: After this change __HB_DEBUG__ controls debug mode in both .c and .prg mode. + Windows specific debug output can still be enabled with __HB_WINDEBUG__. + ; NOTE: I didn't test any of these. Pls do so. + ; NOTE: All above is temporary as it would be better add OutputDebugString() support + to our RTL trace engine (enabled with a flag), plus multiple parameter + support (preferably accepting any types) to HB_TRACESTRING(). + Since my .c skill would kill this effort, or at least make it quite bumpy, + I'd kindly ask someone (Przemek, are you there? ;) to implement it. + Preferably both. + ; TODO: Regenerate all hbqt sources. + 2009-11-15 08:37 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg ! Fixed typo causing build-time flags to not be recognized diff --git a/harbour/contrib/hbqt/Makefile b/harbour/contrib/hbqt/Makefile index 9f7292e975..83390b2234 100644 --- a/harbour/contrib/hbqt/Makefile +++ b/harbour/contrib/hbqt/Makefile @@ -11,6 +11,9 @@ LIBNAME := hbqt PRG_HEADERS := \ hbqt.ch \ +PRG_SOURCES := \ + hbqt_misc.prg + include $(TOP)$(ROOT)contrib/hbqt/detect.mk ifneq ($(HB_HAS_QT),) diff --git a/harbour/contrib/hbqt/generator/hbqtgen.prg b/harbour/contrib/hbqt/generator/hbqtgen.prg index fa893f64da..f73786f12c 100644 --- a/harbour/contrib/hbqt/generator/hbqtgen.prg +++ b/harbour/contrib/hbqt/generator/hbqtgen.prg @@ -509,15 +509,15 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc ) aadd( cpp_, " ( ( " + cWidget + IF( lList, "< void * >", "" ) + " * ) p->ph )->~" + cWidget + "(); " ) aadd( cpp_, " p->ph = NULL;" ) aadd( cpp_, ' HB_TRACE( HB_TR_DEBUG, ( "release_' + pad( cWidget, 27 ) + ' Object deleted!" ) );') - aadd( cpp_, " #if defined(__debug__)" ) - aadd( cpp_, ' just_debug( "' + ' YES release_' + pad( cWidget, 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() );' ) + aadd( cpp_, " #if defined( __HB_DEBUG__ )" ) + aadd( cpp_, ' hbqt_debug( "' + ' YES release_' + pad( cWidget, 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() );' ) aadd( cpp_, " #endif" ) aadd( cpp_, " }" ) aadd( cpp_, " else" ) aadd( cpp_, " {" ) aadd( cpp_, ' HB_TRACE( HB_TR_DEBUG, ( "release_' + pad( cWidget, 27 ) + ' Object Name Missing!" ) );') - aadd( cpp_, " #if defined(__debug__)" ) - aadd( cpp_, ' just_debug( "' + ' NO release_' + cWidget + '" );' ) + aadd( cpp_, " #if defined( __HB_DEBUG__ )" ) + aadd( cpp_, ' hbqt_debug( "' + ' NO release_' + cWidget + '" );' ) aadd( cpp_, " #endif" ) aadd( cpp_, " }" ) ELSE @@ -532,16 +532,16 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc ) aadd( cpp_, " ( ( " + cWidget + IF( lList, "< void * >", "" ) + " * ) p->ph )->~" + cWidget + "(); " ) aadd( cpp_, " p->ph = NULL;" ) aadd( cpp_, ' HB_TRACE( HB_TR_DEBUG, ( "release_' + pad( cWidget, 27 ) + ' Object deleted!" ) );') - aadd( cpp_, " #if defined(__debug__)" ) - aadd( cpp_, ' just_debug( "' + ' YES release_' + pad( cWidget, 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() );' ) + aadd( cpp_, " #if defined( __HB_DEBUG__ )" ) + aadd( cpp_, ' hbqt_debug( "' + ' YES release_' + pad( cWidget, 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() );' ) aadd( cpp_, " #endif" ) ENDIF aadd( cpp_, " }" ) aadd( cpp_, " else" ) aadd( cpp_, " {" ) aadd( cpp_, ' HB_TRACE( HB_TR_DEBUG, ( "release_' + pad( cWidget, 27 ) + ' Object Allready deleted!" ) );' ) - aadd( cpp_, " #if defined(__debug__)" ) - aadd( cpp_, ' just_debug( "' + ' DEL release_' + cWidget + '" );' ) + aadd( cpp_, " #if defined( __HB_DEBUG__ )" ) + aadd( cpp_, ' hbqt_debug( "' + ' DEL release_' + cWidget + '" );' ) aadd( cpp_, " #endif" ) aadd( cpp_, " }" ) ELSE @@ -553,8 +553,8 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc ) aadd( cpp_, "QT_G_FUNC( release_" + cWidget + " ) " ) aadd( cpp_, "{ " ) IF lDestructor - aadd( cpp_, "#if defined(__debug__)" ) - aadd( cpp_, ' just_debug( "' + 'release_' + pad( cWidget, 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() );' ) + aadd( cpp_, "#if defined( __HB_DEBUG__ )" ) + aadd( cpp_, ' hbqt_debug( "' + 'release_' + pad( cWidget, 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() );' ) aadd( cpp_, "#endif" ) aadd( cpp_, " void * ph = ( void * ) Cargo; " ) aadd( cpp_, " if( ph ) " ) @@ -569,8 +569,8 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc ) aadd( cpp_, " }" ) aadd( cpp_, " else" ) aadd( cpp_, " {" ) - aadd( cpp_, "#if defined(__debug__)" ) - aadd( cpp_, 'just_debug( "' + ' Object Name Missing: ' + cWidget + '" );' ) + aadd( cpp_, "#if defined( __HB_DEBUG__ )" ) + aadd( cpp_, 'hbqt_debug( "' + ' Object Name Missing: ' + cWidget + '" );' ) aadd( cpp_, "#endif" ) aadd( cpp_, " }" ) ELSE @@ -581,8 +581,8 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc ) aadd( cpp_, " }" ) aadd( cpp_, " else" ) aadd( cpp_, " {" ) - aadd( cpp_, "#if defined(__debug__)" ) - aadd( cpp_, 'just_debug( "' + '! ph____' + cWidget + '" );' ) + aadd( cpp_, "#if defined( __HB_DEBUG__ )" ) + aadd( cpp_, 'hbqt_debug( "' + '! ph____' + cWidget + '" );' ) aadd( cpp_, "#endif" ) aadd( cpp_, " }" ) ELSE @@ -618,8 +618,8 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc ) IF lObject aadd( cpp_, " new( & p->pq ) QPointer< "+ cWidget +" >( ( " + cWidget + " * ) pObj );" ) ENDIF - aadd( cpp_, " #if defined(__debug__)" ) - aadd( cpp_, ' just_debug( "' + ' new_' + pad( cWidget, 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() );' ) + aadd( cpp_, " #if defined( __HB_DEBUG__ )" ) + aadd( cpp_, ' hbqt_debug( "' + ' new_' + pad( cWidget, 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() );' ) aadd( cpp_, " #endif" ) aadd( cpp_, " return( p ); " ) aadd( cpp_, "} " ) @@ -666,8 +666,8 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc ) aadd( cpp_, " void * pObj = NULL;" ) ENDIF - aadd( cpp_, "#if defined(__debug__)" ) - aadd( cpp_, 'just_debug( "' + ' ' + IF( lDestructor, 'GC', 'NON-GC' ) + ': new ' + pad( cWidget, 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() );' ) + aadd( cpp_, "#if defined( __HB_DEBUG__ )" ) + aadd( cpp_, 'hbqt_debug( "' + ' ' + IF( lDestructor, 'GC', 'NON-GC' ) + ': new ' + pad( cWidget, 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() );' ) aadd( cpp_, "#endif" ) aadd( cpp_, "" ) @@ -684,8 +684,8 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc ) NEXT aadd( cpp_, "" ) - aadd( cpp_, "#if defined(__debug__)" ) - aadd( cpp_, 'just_debug( "' + ' ' + IF( lDestructor, 'GC', 'NON-GC' ) + ': ' + pad( " ", 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hb_getMemUsed() );' ) + aadd( cpp_, "#if defined( __HB_DEBUG__ )" ) + aadd( cpp_, 'hbqt_debug( "' + ' ' + IF( lDestructor, 'GC', 'NON-GC' ) + ': ' + pad( " ", 27 ) + ' %i B %i KB", ( int ) hb_xquery( 1001 ), hbqt_getmemused() );' ) aadd( cpp_, "#endif" ) //IF lObject .or. IsMemObject( cWidget ) diff --git a/harbour/contrib/hbqt/hbqt.ch b/harbour/contrib/hbqt/hbqt.ch index 68d4a89993..72292e150b 100644 --- a/harbour/contrib/hbqt/hbqt.ch +++ b/harbour/contrib/hbqt/hbqt.ch @@ -67,14 +67,10 @@ #ifndef _HBQT_CH -#if defined( __HB_OUTDEBUG__ ) - #if defined( __PLATFORM__WINDOWS ) .AND. defined( __HB_WINDEBUG__ ) - #xtranslate HB_OUTDEBUG( [] ) => wapi_OutputDebugString( ) - #else - #xtranslate HB_OUTDEBUG( [] ) => hb_TraceString( ) - #endif +#if defined( __HB_DEBUG__ ) + #xtranslate HBQT_DEBUG( [] ) => _HBQT_DEBUG( ) #else - #xtranslate HB_OUTDEBUG( [] ) => iif( .T.,, ) + #xtranslate HBQT_DEBUG( [] ) => iif( .T.,, ) #endif #define QT_PTROF( oObj ) ( oObj:pPtr ) diff --git a/harbour/contrib/hbqt/hbqt.h b/harbour/contrib/hbqt/hbqt.h index 826f8390a9..36c7eed773 100644 --- a/harbour/contrib/hbqt/hbqt.h +++ b/harbour/contrib/hbqt/hbqt.h @@ -61,10 +61,9 @@ #if QT_VERSION >= 0x040500 -// #define __debug__ -#if defined(__debug__) - int hb_getMemUsed( void ); - void just_debug( const char * sTraceMsg, ... ); +#if defined( __HB_DEBUG__ ) + int hbqt_getmemused( void ); + void hbqt_debug( const char * sTraceMsg, ... ); #endif #define QT_G_FUNC( hbfunc ) void hbfunc( void * Cargo ) /* callback function for cleaning garbage memory pointer */ diff --git a/harbour/contrib/hbqt/hbqt_destruct.cpp b/harbour/contrib/hbqt/hbqt_destruct.cpp index bd0a08af73..b0fea02f5a 100644 --- a/harbour/contrib/hbqt/hbqt_destruct.cpp +++ b/harbour/contrib/hbqt/hbqt_destruct.cpp @@ -51,7 +51,7 @@ */ /*----------------------------------------------------------------------*/ -#if defined(__debug__) +#if defined( __HB_DEBUG__ ) #define HB_OS_WIN_USED #endif @@ -102,30 +102,42 @@ void * hbqt_gcpointer( int iParam ) } } -#if defined(__debug__) +#if defined( __HB_DEBUG__ ) #if defined( HB_OS_WIN ) - #include + #include #endif -void just_debug( const char * sTraceMsg, ... ) +void hbqt_debug( const char * sTraceMsg, ... ) { #if defined( HB_OS_WIN ) if( sTraceMsg ) { - char buffer[ 1024 ]; - va_list ap; + char buffer[ 1024 ]; + va_list ap; + + va_start( ap, sTraceMsg ); + hb_vsnprintf( buffer, sizeof( buffer ), sTraceMsg, ap ); + va_end( ap ); - va_start( ap, sTraceMsg ); - hb_vsnprintf( buffer, sizeof( buffer ), sTraceMsg, ap ); - va_end( ap ); - - OutputDebugString( buffer ); + #if defined( UNICODE ) + { + LPTSTR lpOutputString = HB_TCHAR_CONVTO( buffer ); + OutputDebugString( lpOutputString ); + HB_TCHAR_FREE( lpOutputString ); + } + #else + OutputDebugString( buffer ); + #endif } #endif } -int hb_getMemUsed( void ) +#endif + +#if defined( __HB_DEBUG__ ) + +int hbqt_getmemused( void ) { int size = 0; #if defined( HB_OS_WIN ) @@ -146,10 +158,10 @@ int hb_getMemUsed( void ) #endif -HB_FUNC( HB_GETMEMUSED ) +HB_FUNC( HBQT_GETMEMUSED ) { -#if defined(__debug__) - hb_retni( hb_getMemUsed() ); +#if defined( __HB_DEBUG__ ) + hb_retni( hbqt_getmemused() ); #else hb_retni( 0 ); #endif diff --git a/harbour/contrib/hbqt/hbqt_slots.cpp b/harbour/contrib/hbqt/hbqt_slots.cpp index e1a82b98aa..7ecb3ab72c 100644 --- a/harbour/contrib/hbqt/hbqt_slots.cpp +++ b/harbour/contrib/hbqt/hbqt_slots.cpp @@ -1958,8 +1958,8 @@ HB_FUNC( QT_DISCONNECT_SIGNAL ) s_s->listActv[ i - 1 ] = false; ret = disconnect_signal( object, signal ); bFreed = true; -#if defined(__debug__) -just_debug( " QT_DISCONNECT_SIGNAL: %s %s", ret ? "YES" : "NO", signal ); +#if defined( __HB_DEBUG__ ) +hbqt_debug( " QT_DISCONNECT_SIGNAL: %s %s", ret ? "YES" : "NO", signal ); #endif } } @@ -2026,13 +2026,13 @@ Events::~Events() bool Events::eventFilter( QObject * object, QEvent * event ) { QEvent::Type eventtype = event->type(); -#if defined(__debug__) -//just_debug( "0 Events::eventFilter = %i", ( int ) eventtype ); +#if defined( __HB_DEBUG__ ) +//hbqt_debug( "0 Events::eventFilter = %i", ( int ) eventtype ); #endif if( ( int ) eventtype == 0 ) { -#if defined(__debug__) -//just_debug( "x Events::eventFilter = 0" ); +#if defined( __HB_DEBUG__ ) +//hbqt_debug( "x Events::eventFilter = 0" ); #endif return false; } @@ -2042,8 +2042,8 @@ bool Events::eventFilter( QObject * object, QEvent * event ) int found = object->property( prop ).toInt(); if( found == 0 ) { -#if defined(__debug__) -//just_debug( "f Events::eventFilter = %s %i", " found=0", ( int ) eventtype ); +#if defined( __HB_DEBUG__ ) +//hbqt_debug( "f Events::eventFilter = %s %i", " found=0", ( int ) eventtype ); #endif return false; } @@ -2054,12 +2054,12 @@ bool Events::eventFilter( QObject * object, QEvent * event ) { PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM pEvent = hb_itemPutPtr( NULL, event ); -#if defined(__debug__) -//just_debug( "0 Events::eventFilter = %i", ( int ) eventtype ); +#if defined( __HB_DEBUG__ ) +//hbqt_debug( "0 Events::eventFilter = %i", ( int ) eventtype ); #endif ret = hb_itemGetL( hb_vmEvalBlockV( ( PHB_ITEM ) listBlock.at( found - 1 ), 2, pObject, pEvent ) ); -#if defined(__debug__) -//just_debug( "1 Events::eventFilter = %s", ret ? " yes" : " no" ); +#if defined( __HB_DEBUG__ ) +//hbqt_debug( "1 Events::eventFilter = %s", ret ? " yes" : " no" ); #endif hb_itemRelease( pObject ); hb_itemRelease( pEvent ); @@ -2075,8 +2075,8 @@ bool Events::eventFilter( QObject * object, QEvent * event ) event->ignore(); } } -#if defined(__debug__) -//just_debug( "1 Events::eventFilter = %i", ( int ) eventtype ); +#if defined( __HB_DEBUG__ ) +//hbqt_debug( "1 Events::eventFilter = %i", ( int ) eventtype ); #endif return ret; } @@ -2137,8 +2137,8 @@ HB_FUNC( QT_DISCONNECT_EVENT ) s_e->listActv[ i - 1 ] = false; object->setProperty( prop, QVariant() ); bRet = true; -#if defined(__debug__) -just_debug( " QT_DISCONNECT_EVENT: %i", type ); +#if defined( __HB_DEBUG__ ) +hbqt_debug( " QT_DISCONNECT_EVENT: %i", type ); #endif } hb_retl( bRet ); @@ -2151,12 +2151,12 @@ HbTableView::HbTableView( QWidget * parent ) : QTableView( parent ) } HbTableView::~HbTableView() { -#if defined(__debug__) -just_debug( "HbTableView::~HbTableView() 0 %i %i", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); +#if defined( __HB_DEBUG__ ) +hbqt_debug( "HbTableView::~HbTableView() 0 %i %i", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ); #endif destroy(); -#if defined(__debug__) -just_debug( "HbTableView::~HbTableView() 1 %i %i", ( int ) hb_xquery( 1001 ), hb_getMemUsed() ); +#if defined( __HB_DEBUG__ ) +hbqt_debug( "HbTableView::~HbTableView() 1 %i %i", ( int ) hb_xquery( 1001 ), hbqt_getmemused() ); #endif } void HbTableView::keyPressEvent( QKeyEvent * event ) @@ -2189,7 +2189,7 @@ void HbTableView::resizeEvent( QResizeEvent * event ) } QModelIndex HbTableView::moveCursor( HbTableView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers ) { -//just_debug( "HbTableView: action=%i %i", cursorAction, QAbstractItemView::MoveDown ); +//hbqt_debug( "HbTableView: action=%i %i", cursorAction, QAbstractItemView::MoveDown ); //emit sg_moveCursor( cursorAction, modifiers ); return QTableView::moveCursor( cursorAction, modifiers ); @@ -2204,7 +2204,7 @@ void HbTableView::scrollContentsBy( int x, int y ) } void HbTableView::scrollTo( const QModelIndex & index, QAbstractItemView::ScrollHint hint ) { -//just_debug( "HbTableView:scrollTo row = %i col = %i", index.row(),index.column() ); +//hbqt_debug( "HbTableView:scrollTo row = %i col = %i", index.row(),index.column() ); QTableView::scrollTo( index, hint ); } @@ -2252,29 +2252,29 @@ QVariant fetchRole( PHB_ITEM block, int what, int par1, int par2 ) #else vv = hb_itemGetCPtr( ret ); #endif -#if defined(__debug__) -//just_debug( " fetchRole[ s = %s ]", hb_itemGetCPtr( ret ) ); +#if defined( __HB_DEBUG__ ) +//hbqt_debug( " fetchRole[ s = %s ]", hb_itemGetCPtr( ret ) ); #endif } else if( hb_itemType( ret ) & HB_IT_LOGICAL ) { vv = hb_itemGetL( ret ); -#if defined(__debug__) -just_debug( " fetchRole[ l = %i ]", hb_itemGetL( ret ) ); +#if defined( __HB_DEBUG__ ) +hbqt_debug( " fetchRole[ l = %i ]", hb_itemGetL( ret ) ); #endif } else if( hb_itemType( ret ) & HB_IT_DOUBLE ) { vv = hb_itemGetND( ret ); -#if defined(__debug__) -just_debug( " fetchRole[ d = %i ]", hb_itemGetND( ret ) ); +#if defined( __HB_DEBUG__ ) +hbqt_debug( " fetchRole[ d = %i ]", hb_itemGetND( ret ) ); #endif } else if( hb_itemType( ret ) & HB_IT_NUMERIC ) { vv = hb_itemGetNI( ret ); -#if defined(__debug__) -//just_debug( " fetchRole[ n = %i ]", hb_itemGetNI( ret ) ); +#if defined( __HB_DEBUG__ ) +//hbqt_debug( " fetchRole[ n = %i ]", hb_itemGetNI( ret ) ); #endif } } @@ -2305,8 +2305,8 @@ Qt::ItemFlags HbDbfModel::flags( const QModelIndex & index ) const QVariant HbDbfModel::data( const QModelIndex & index, int role ) const { -#if defined(__debug__) -//just_debug( "data - row=%i col=%i role=%i", index.row(), index.column(), role ); +#if defined( __HB_DEBUG__ ) +//hbqt_debug( "data - row=%i col=%i role=%i", index.row(), index.column(), role ); #endif if( !index.isValid() ) return( QVariant() ); @@ -2356,8 +2356,8 @@ QVariant HbDbfModel::data( const QModelIndex & index, int role ) const QVariant HbDbfModel::headerData( int section, Qt::Orientation orientation, int role ) const { -#if defined(__debug__) -//just_debug( "headerData - section=%i orient=%i role=%i name=%s", section, orientation, role, objectName() ); +#if defined( __HB_DEBUG__ ) +//hbqt_debug( "headerData - section=%i orient=%i role=%i name=%s", section, orientation, role, objectName() ); #endif if( orientation == Qt::Horizontal ) { @@ -2495,13 +2495,13 @@ MyMainWindow::MyMainWindow( PHB_ITEM pBlock, int iThreadID ) } MyMainWindow::~MyMainWindow( void ) { -#if defined(__debug__) -just_debug( " MyMainWindow::~MyMainWindow 0" ); +#if defined( __HB_DEBUG__ ) +hbqt_debug( " MyMainWindow::~MyMainWindow 0" ); #endif hb_itemRelease( block ); destroy(); -#if defined(__debug__) -just_debug( " MyMainWindow::~MyMainWindow 1" ); +#if defined( __HB_DEBUG__ ) +hbqt_debug( " MyMainWindow::~MyMainWindow 1" ); #endif } void MyMainWindow::paintEvent( QPaintEvent * event ) @@ -2538,7 +2538,7 @@ void MyMainWindow::paintEvent( QPaintEvent * event ) } bool MyMainWindow::event( QEvent * event ) { -//just_debug( " event(%i) %i", threadID, (int) event->type() ); +//hbqt_debug( " event(%i) %i", threadID, (int) event->type() ); hb_threadMutexLock( s_mutex ); #if 0 if( hb_vmRequestReenter() ) @@ -2692,8 +2692,8 @@ void MyMainWindow::resizeEvent( QResizeEvent * event ) } void MyMainWindow::closeEvent( QCloseEvent * event ) { -#if defined(__debug__) -just_debug( " close event(%i)", threadID ); +#if defined( __HB_DEBUG__ ) +hbqt_debug( " close event(%i)", threadID ); #endif hb_threadMutexLock( s_mutex ); if( hb_vmRequestReenter() ) diff --git a/harbour/contrib/hbqt/tests/demoqt.prg b/harbour/contrib/hbqt/tests/demoqt.prg index 23daf253a7..65d7359449 100644 --- a/harbour/contrib/hbqt/tests/demoqt.prg +++ b/harbour/contrib/hbqt/tests/demoqt.prg @@ -100,7 +100,7 @@ EXIT PROCEDURE Qt_End() /*----------------------------------------------------------------------*/ FUNCTION My_Events() -HB_OUTDEBUG( "Key Pressed" ) +HBQT_DEBUG( "Key Pressed" ) RETURN nil /*----------------------------------------------------------------------*/ @@ -114,8 +114,8 @@ PROCEDURE Main() Qt_SetEventFilter() Qt_SetEventSlots() -HB_OUTDEBUG( " " ) -HB_OUTDEBUG( "-----------------b-----------------" ) +HBQT_DEBUG( " " ) +HBQT_DEBUG( "-----------------b-----------------" ) FOR i := 1 TO 1 oWnd := QMainWindow():new() @@ -149,17 +149,17 @@ HB_OUTDEBUG( "-----------------b-----------------" ) oProg := Build_ProgressBar( oDA, { 30,300 }, { 200,30 } ) aList := Build_ListBox( oDA, { 310,240 }, { 150, 100 } ) -HB_OUTDEBUG( "connected: " + IIF( QT_CONNECT_EVENT( QT_PTROF( oWnd ), 6, {|o,e| My_Events( o, e ) } ), "Yes", "No" ) ) +HBQT_DEBUG( "connected: " + IIF( QT_CONNECT_EVENT( QT_PTROF( oWnd ), 6, {|o,e| My_Events( o, e ) } ), "Yes", "No" ) ) oWnd:Show() qApp:exec() -HB_OUTDEBUG( "----------------- qApp:exec -----------------" ) +HBQT_DEBUG( "----------------- qApp:exec -----------------" ) xReleaseMemory( { oBtn, oLabel, oProg, oSBar, aGrid, aList, aMenu, aTool, aTabs, oDA, oWnd } ) -HB_OUTDEBUG( "-------------------- exit -------------------" ) +HBQT_DEBUG( "-------------------- exit -------------------" ) RETURN @@ -168,7 +168,7 @@ HB_OUTDEBUG( "-------------------- exit -------------------" ) FUNCTION xReleaseMemory( aObj ) #if 1 LOCAL i -HB_OUTDEBUG( "----------------- Releasing Memory -----------------" ) +HBQT_DEBUG( "----------------- Releasing Memory -----------------" ) FOR i := 1 TO len( aObj ) IF hb_isObject( aObj[ i ] ) aObj[ i ]:pPtr := 1 @@ -176,7 +176,7 @@ HB_OUTDEBUG( "----------------- Releasing Memory -----------------" ) xReleaseMemory( aObj[ i ] ) ENDIF NEXT -HB_OUTDEBUG( "------------------ Memory Released ------------------" ) +HBQT_DEBUG( "------------------ Memory Released ------------------" ) #else HB_SYMBOL_UNUSED( aObj ) #endif @@ -451,7 +451,7 @@ STATIC FUNCTION Build_TreeView( oWnd ) oTV := QTreeView():new( QT_PTROF( oWnd ) ) oTV:setMouseTracking( .t. ) - //Qt_Connect_Signal( QT_PTROF( oTV ), QT_EVE_HOVERED, {|o,i| hb_outDebug( "oTV:hovered" ) } ) + //Qt_Connect_Signal( QT_PTROF( oTV ), QT_EVE_HOVERED, {|o,i| HBQT_DEBUG( "oTV:hovered" ) } ) oDirModel := QDirModel():new() oTV:setModel( QT_PTROF( oDirModel ) ) oTV:move( 5, 7 ) @@ -467,7 +467,7 @@ STATIC FUNCTION Build_ListBox( oWnd, aPos, aSize ) oListBox := QListView():New( QT_PTROF( oWnd ) ) oListBox:setMouseTracking( .t. ) - //Qt_Connect_Signal( QT_PTROF( oListBox ), QT_EVE_HOVERED, {|o,i| hb_outDebug( "oListBox:hovered" ) } ) + //Qt_Connect_Signal( QT_PTROF( oListBox ), QT_EVE_HOVERED, {|o,i| HBQT_DEBUG( "oListBox:hovered" ) } ) oStrList := QStringList():new() @@ -522,7 +522,7 @@ STATIC FUNCTION Build_Controls( oWnd ) oComboBox:addItem( "First" ) oComboBox:addItem( "Second" ) oComboBox:addItem( "Third" ) - //Qt_Connect_Signal( QT_PTROF( oComboBox ), QT_EVE_HIGHLIGHTED_I , {|o,i| hb_outDebug( oComboBox:itemText( i ) ) } ) + //Qt_Connect_Signal( QT_PTROF( oComboBox ), QT_EVE_HIGHLIGHTED_I , {|o,i| HBQT_DEBUG( oComboBox:itemText( i ) ) } ) Qt_Connect_Signal( QT_PTROF( oComboBox ), QT_EVE_CURRENTINDEXCHANGED_I, {|o,i| o := o, i := i, MsgInfo( oComboBox:itemText( i ) ) } ) oComboBox:move( 5, 60 ) oComboBox:resize( 345, 30 ) diff --git a/harbour/contrib/hbxbp/tests/demoxbp.prg b/harbour/contrib/hbxbp/tests/demoxbp.prg index 866bf3a002..5e0df31ce1 100644 --- a/harbour/contrib/hbxbp/tests/demoxbp.prg +++ b/harbour/contrib/hbxbp/tests/demoxbp.prg @@ -110,7 +110,7 @@ FUNCTION _BuildADialog() PROCEDURE DispMem( cMessage ) - xbp_debug( ThreadID(), padc( cMessage, 40 ), memory( 1001 ), hb_getMemUsed() ) + HBXBP_DEBUG( ThreadID(), padc( cMessage, 40 ), memory( 1001 ), hb_getMemUsed() ) RETURN @@ -121,10 +121,10 @@ PROCEDURE BuildADialog() LOCAL nThread := ThreadID() //LOCAL oStat, aMenu, aTool, aBrow, aChek, a3Sta -xbp_debug( " . " ) -xbp_debug( " . " ) -xbp_debug( " . " ) -xbp_debug( " . " ) +HBXBP_DEBUG( " . " ) +HBXBP_DEBUG( " . " ) +HBXBP_DEBUG( " . " ) +HBXBP_DEBUG( " . " ) DispMem( "At Startup of Thread" ) @@ -134,7 +134,7 @@ DispMem( "At Startup of Thread" ) DispMem( "oDlg := GuiStdDialog" ) oDlg:close := {|| MsgBox( "You can also close me by pressing [ESC]" ), .T. } - // oDlg:killDisplayFocus := {|| hb_OutDebug( "Loosing Display Focus" ) } + // oDlg:killDisplayFocus := {|| HBXBP_DEBUG( "Loosing Display Focus" ) } SetAppWindow( oDlg ) oDlg:Show() @@ -147,7 +147,7 @@ DispMem( "oDlg := GuiStdDialog" ) ( aSize[ 2 ] - oDlg:currentSize()[ 2 ] ) / 2 } ) /* Callback to report the mouse moves */ - // oDa:motion := {|| hb_outDebug( "MouseMove: "+cThread ) } + // oDa:motion := {|| HBXBP_DEBUG( "MouseMove: "+cThread ) } /* Make background color of :drawingArea different */ oDa:setColorBG( GraMakeRGBColor( { 134,128,200 } ) ) @@ -219,8 +219,8 @@ DispMem( "Build_Statics" ) nEvent := AppEvent( @mp1, @mp2, @oXbp ) IF ( nEvent == xbeP_Close ) .OR. ( nEvent == xbeP_Keyboard .and. mp1 == xbeK_ESC ) -xbp_debug( ". " ) -xbp_debug( ".............................. WOW ................................." ) +HBXBP_DEBUG( ". " ) +HBXBP_DEBUG( ".............................. WOW ................................." ) EXIT ELSEIF nEvent == xbeP_Keyboard .and. mp1 == xbeK_F1 #if 0 @@ -237,8 +237,8 @@ xbp_debug( ".............................. WOW ................................. oHTM := NIL -xbp_debug( "------------------------------ WOW ---------------------------------" ) -xbp_debug( ". " ) +HBXBP_DEBUG( "------------------------------ WOW ---------------------------------" ) +HBXBP_DEBUG( ". " ) DispMem( "THE END" ) @@ -252,7 +252,6 @@ PROCEDURE AppSys() /*----------------------------------------------------------------------*/ #ifdef __XPP__ -FUNCTION Hb_OutDebug( cStr ) ; RETURN nil FUNCTION Hb_Symbol_Unused() ; RETURN nil FUNCTION Hb_NtoS( n ) ; RETURN ltrim( str( n ) ) FUNCTION Hb_ThreadStart() ; RETURN nil @@ -717,13 +716,13 @@ STATIC FUNCTION Build_ComboBox( oWnd ) // Code block for selection: // - assign to LOCAL variable using :getData() // - display LOCAL variable using DispoutAt() - bAction := {|mp1, mp2, obj| UNU( mp1 ), UNU( mp2 ), obj:XbpSLE:getData(), hb_outDebug( "Highlighted: "+cDay ) } + bAction := {|mp1, mp2, obj| UNU( mp1 ), UNU( mp2 ), obj:XbpSLE:getData(), HBXBP_DEBUG( "Highlighted: "+cDay ) } // Assign code block for selection with Up and Down keys oCombo:ItemMarked := bAction // Assign code block for selection by left mouse click in list box - oCombo:ItemSelected := {|mp1, mp2, obj| UNU( mp1 ), UNU( mp2 ), obj:XbpSLE:getData(), hb_outDebug( "Selected: "+cDay ) } + oCombo:ItemSelected := {|mp1, mp2, obj| UNU( mp1 ), UNU( mp2 ), obj:XbpSLE:getData(), HBXBP_DEBUG( "Selected: "+cDay ) } // Copy data from array to combo box, then discard array FOR i := 1 TO 7 @@ -786,7 +785,7 @@ FUNCTION Build_SLEs( oWnd ) oXbp:setData() // Assign the value of the edit buffer to a LOCAL variable // when the input focus is lost - oXbp:killInputFocus := { |mp1,mp2,oSLE| UNU( mp1 ), UNU( mp2 ), oSLE:getData(), hb_outDebug( "Var B =" + cVarB ) } + oXbp:killInputFocus := { |mp1,mp2,oSLE| UNU( mp1 ), UNU( mp2 ), oSLE:getData(), HBXBP_DEBUG( "Var B =" + cVarB ) } oXbp:setColorBG( GraMakeRGBColor( { 190,190,190 } ) ) @@ -1265,8 +1264,8 @@ FUNCTION Build_HTMLViewer( oWnd ) oHtm := XbpHTMLViewer():new( oFrm, , {10,10}, {sz_[1]-10-10,sz_[2]-10-10} ) oHtm:create() oHtm:navigate( "http://www.harbour-project.org" ) - oHtm:titleChange := {|e| UNU( e ), hb_outDebug( e ) } - // oHtm:progressChange := {|nProg,nMax| hb_outDebug( "Downloaded: "+str( nProg*100/nMax,10,0 ) ) } + oHtm:titleChange := {|e| UNU( e ), HBXBP_DEBUG( e ) } + // oHtm:progressChange := {|nProg,nMax| HBXBP_DEBUG( "Downloaded: "+str( nProg*100/nMax,10,0 ) ) } RETURN oHtm @@ -1283,7 +1282,7 @@ FUNCTION Build_FileDialog( oWnd, cMode ) //oDlg:setColorBG( GraMakeRGBColor( { 170,170,170 } ) ) aFiles := oDlg:open( "c:\temp", , .t. ) IF !empty( aFiles ) - aeval( aFiles, {|e| UNU( e ), hb_outDebug( e ) } ) + aeval( aFiles, {|e| UNU( e ), HBXBP_DEBUG( e ) } ) ENDIF ELSE oDlg:title := "Save this Database" @@ -1291,7 +1290,7 @@ FUNCTION Build_FileDialog( oWnd, cMode ) oDlg:quit := {|| MsgBox( "Quitting the Dialog" ), 1 } cFile := oDlg:saveAs( "c:\temp\myfile.dbf" ) IF !empty( cFile ) - hb_outDebug( cFile ) + HBXBP_DEBUG( cFile ) ENDIF ENDIF @@ -1504,7 +1503,7 @@ FUNCTION Build_Rtf( oWnd ) oRTF:setFontCompoundName( "12.Times" ) - //oRTF:change := {|| /*hb_outDebug( "change"*/ NIL ) } + //oRTF:change := {|| /*HBXBP_DEBUG( "change"*/ NIL ) } // Assign text to the RTF object's text buffer oRTF:text := "Text with varying " + Chr(10) +; @@ -1656,8 +1655,8 @@ FUNCTION Build_Browse( oWnd ) oXbpBrowse:phyPosBlock := {| | OrdKeyNo() } ENDIF - oXbpBrowse:headerRbDown := {|mp1, mp2, o| mp1 := mp1, xbp_debug( o:getColumn( mp2 ):heading ) } - oXbpBrowse:itemSelected := {|| xbp_debug( 'itemSelected' ) } + oXbpBrowse:headerRbDown := {|mp1, mp2, o| mp1 := mp1, HBXBP_DEBUG( o:getColumn( mp2 ):heading ) } + oXbpBrowse:itemSelected := {|| HBXBP_DEBUG( 'itemSelected' ) } #ifdef __HARBOUR__ s := "selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5, stop: 0 #FF92BB, stop: 1 gray); " diff --git a/harbour/contrib/hbxbp/xbp.ch b/harbour/contrib/hbxbp/xbp.ch index 0b97fc0e60..feabf2c488 100644 --- a/harbour/contrib/hbxbp/xbp.ch +++ b/harbour/contrib/hbxbp/xbp.ch @@ -4,19 +4,15 @@ #ifndef _XBP_CH -#if defined( __HB_OUTDEBUG__ ) - #if defined( __PLATFORM__WINDOWS ) .AND. defined( __HB_WINDEBUG__ ) - #xtranslate HB_OUTDEBUG( [] ) => wapi_OutputDebugString( ) - #else - #xtranslate HB_OUTDEBUG( [] ) => hb_TraceString( ) - #endif +#if defined( __HB_DEBUG__ ) + #xtranslate HBXBP_DEBUG( [] ) => _HBXBP_DEBUG( ) #else - #xtranslate HB_OUTDEBUG( [] ) => iif( .T.,, ) + #xtranslate HBXBP_DEBUG( [] ) => iif( .T.,, ) #endif /*----------------------------------------------------------------------*/ -#define QT_PTROF( oObj ) ( oObj:pPtr ) +#include "hbqt.ch" #define HBXBP_EVENT_HANDLED 0 #define HBXBP_EVENT_UNHANDLED 1 diff --git a/harbour/contrib/hbxbp/xbp3state.prg b/harbour/contrib/hbxbp/xbp3state.prg index fa8150635a..6f8ee8bab7 100644 --- a/harbour/contrib/hbxbp/xbp3state.prg +++ b/harbour/contrib/hbxbp/xbp3state.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpappevent.prg b/harbour/contrib/hbxbp/xbpappevent.prg index 9aa7f362c9..e9c9f3ad35 100644 --- a/harbour/contrib/hbxbp/xbpappevent.prg +++ b/harbour/contrib/hbxbp/xbpappevent.prg @@ -65,9 +65,10 @@ /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ -#include "appevent.ch" #include "hbqt.ch" +#include "appevent.ch" + /*----------------------------------------------------------------------*/ STATIC FUNCTION hbqt_QTranslateKey( kbm, key, shiftkey, altkey, controlkey ) diff --git a/harbour/contrib/hbxbp/xbpbitmap.prg b/harbour/contrib/hbxbp/xbpbitmap.prg index a1977aa60f..e769d25b97 100644 --- a/harbour/contrib/hbxbp/xbpbitmap.prg +++ b/harbour/contrib/hbxbp/xbpbitmap.prg @@ -71,7 +71,6 @@ #include "xbp.ch" #include "gra.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpbrowse.prg b/harbour/contrib/hbxbp/xbpbrowse.prg index 2ad532e309..fb808406dc 100644 --- a/harbour/contrib/hbxbp/xbpbrowse.prg +++ b/harbour/contrib/hbxbp/xbpbrowse.prg @@ -75,7 +75,6 @@ #include "xbp.ch" #include "gra.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ @@ -753,9 +752,9 @@ METHOD XbpBrowse:destroy() FUNCTION ShowMem( lYes ) IF lYes - xbp_Debug( " ." ) + HBXBP_DEBUG( " ." ) ENDIF - xbp_Debug( " Mem Used "+IF( lYes, "1001", " " ), memory( 1001 ) ) + HBXBP_DEBUG( " Mem Used "+IF( lYes, "1001", " " ), memory( 1001 ) ) RETURN nil /*----------------------------------------------------------------------*/ @@ -764,7 +763,7 @@ METHOD XbpBrowse:exeBlock( nEvent, p1, p2, p3 ) LOCAL oWheelEvent, oMouseEvent, i, nRow, nRowPos, nCol, nColPos, oPoint HB_SYMBOL_UNUSED( p2 ) -//xbp_debug( " XbpBrowse:exeblock:", nEvent, 0, memory( 1001 ) ) +//HBXBP_DEBUG( " XbpBrowse:exeblock:", nEvent, 0, memory( 1001 ) ) DO CASE CASE nEvent == 1 /* Keypress Event */ SetAppEvent( xbeP_Keyboard, XbpQKeyEventToAppEvent( p1 ), NIL, self ) @@ -1021,7 +1020,7 @@ METHOD handleEvent( nEvent, mp1, mp2 ) CLASS XbpBrowse METHOD XbpBrowse:supplyInfo( nMode, nInfo, p2, p3 ) -//xbp_debug( 0, 'supplyInfo:', nMode, nInfo, memory( 1001 ) ) +//HBXBP_DEBUG( 0, 'supplyInfo:', nMode, nInfo, memory( 1001 ) ) DO CASE CASE nMode == 141 /* Main View Header|Data */ IF nInfo == HBQT_BRW_COLCOUNT @@ -1263,7 +1262,7 @@ METHOD setCurrentIndex( lReset ) CLASS XbpBrowse DEFAULT lReset TO .t. -//xbp_DEbug( " setCurrentIndex ", 0, lReset, memory( 1001 ) ) +//HBXBP_DEBUG( " setCurrentIndex ", 0, lReset, memory( 1001 ) ) IF lReset ::oDbfModel:reset() /* Important */ @@ -1279,7 +1278,7 @@ METHOD setCurrentIndex( lReset ) CLASS XbpBrowse pIndex := ::oDbfModel:index( ::rowPos - 1, ::colPos - 1 ) ::oTableView:setCurrentIndex( pIndex ) -//xbp_DEbug( " setCurrentIndex ", 1, lReset, memory( 1001 ) ) +//HBXBP_DEBUG( " setCurrentIndex ", 1, lReset, memory( 1001 ) ) RETURN Self /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpcheckbox.prg b/harbour/contrib/hbxbp/xbpcheckbox.prg index 1a2b970331..f46619ebce 100644 --- a/harbour/contrib/hbxbp/xbpcheckbox.prg +++ b/harbour/contrib/hbxbp/xbpcheckbox.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpcombobox.prg b/harbour/contrib/hbxbp/xbpcombobox.prg index fd00640291..9ee0fde489 100644 --- a/harbour/contrib/hbxbp/xbpcombobox.prg +++ b/harbour/contrib/hbxbp/xbpcombobox.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpdataref.prg b/harbour/contrib/hbxbp/xbpdataref.prg index 09ae0d5b68..252ef7072a 100644 --- a/harbour/contrib/hbxbp/xbpdataref.prg +++ b/harbour/contrib/hbxbp/xbpdataref.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ @@ -144,7 +143,7 @@ METHOD XbpDataRef:setData( xValue, mp2 ) HB_SYMBOL_UNUSED( mp2 ) -//hb_outDebug( cClass +' '+ ::cargo +"..."+ IF(empty(xValue)," empty ",valtype(xValue)) ) +//HBXBP_DEBUG( cClass +' '+ ::cargo +"..."+ IF(empty(xValue)," empty ",valtype(xValue)) ) IF hb_isBlock( ::dataLink ) ::sl_editBuffer := eval( ::dataLink, xValue ) diff --git a/harbour/contrib/hbxbp/xbpdialog.prg b/harbour/contrib/hbxbp/xbpdialog.prg index 9baa4f2840..fd658f63da 100644 --- a/harbour/contrib/hbxbp/xbpdialog.prg +++ b/harbour/contrib/hbxbp/xbpdialog.prg @@ -72,7 +72,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpfiledialog.prg b/harbour/contrib/hbxbp/xbpfiledialog.prg index 3a7b50fbec..91b4d8c730 100644 --- a/harbour/contrib/hbxbp/xbpfiledialog.prg +++ b/harbour/contrib/hbxbp/xbpfiledialog.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpfontdialog.prg b/harbour/contrib/hbxbp/xbpfontdialog.prg index 0e9ddd2005..13a12e71c0 100644 --- a/harbour/contrib/hbxbp/xbpfontdialog.prg +++ b/harbour/contrib/hbxbp/xbpfontdialog.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpgeneric.prg b/harbour/contrib/hbxbp/xbpgeneric.prg index 2ab2bb7c40..403fe3243b 100644 --- a/harbour/contrib/hbxbp/xbpgeneric.prg +++ b/harbour/contrib/hbxbp/xbpgeneric.prg @@ -71,8 +71,6 @@ #include "gra.ch" #include "appevent.ch" -#include "hbqt.ch" - /*----------------------------------------------------------------------*/ #define EVENT_BUFFER 200 @@ -176,14 +174,14 @@ FUNCTION SetAppEvent( nEvent, mp1, mp2, oXbp ) nEventIn := 1 ENDIF -//xbp_debug( 0, "SetAppEvent ... ", threadID(), nEvent, xbeP_Paint ) +//HBXBP_DEBUG( 0, "SetAppEvent ... ", threadID(), nEvent, xbeP_Paint ) ts_events[ nEventIn,1 ] := nEvent ts_events[ nEventIn,2 ] := mp1 ts_events[ nEventIn,3 ] := mp2 ts_events[ nEventIn,4 ] := oXbp -//xbp_debug( 1, "SetAppEvent ... ", threadID(), nEvent ) +//HBXBP_DEBUG( 1, "SetAppEvent ... ", threadID(), nEvent ) RETURN nil /*----------------------------------------------------------------------*/ @@ -198,7 +196,7 @@ FUNCTION AppEvent( mp1, mp2, oXbp, nTimeout ) IF ++nEventOut > EVENT_BUFFER nEventOut := 1 ENDIF -//xbp_debug( " AppEvent ... ", nThreadID, nEventOut ) +//HBXBP_DEBUG( " AppEvent ... ", nThreadID, nEventOut ) DO WHILE !empty( oEventLoop ) //.t. oEventLoop:processEvents( QEventLoop_AllEvents ) @@ -212,7 +210,7 @@ FUNCTION AppEvent( mp1, mp2, oXbp, nTimeout ) ENDIF hb_idleSleep( 0.01 ) /* Releases CPU cycles */ ENDDO -//xbp_debug( "..........................", threadID() ) +//HBXBP_DEBUG( "..........................", threadID() ) RETURN nEvent @@ -295,45 +293,6 @@ FUNCTION GraMakeRGBColor( aRGB ) RETURN nRGB -/*----------------------------------------------------------------------*/ -// #define __debug__ -FUNCTION Xbp_Debug( ... ) - #ifdef __debug__ - LOCAL s := "" - LOCAL aP := hb_aParams() - - aeval( aP, {|e| s += Xbp_XtoS( e ) + ' ' } ) - hb_ToOutDebug( s ) - #endif - RETURN nil - -/*----------------------------------------------------------------------*/ - -STATIC FUNCTION Xbp_XtoS( xVar ) - LOCAL cType - - cType := valtype( xVar ) - DO CASE - CASE cType == "N" - RETURN str( xVar ) - CASE cType == "D" - RETURN dtoc( xVar ) - CASE cType == "L" - RETURN IF( xVar, "Yes", "No" ) - CASE cType == "M" - RETURN xVar - CASE cType == "C" - RETURN xVar - CASE cType == "A" - RETURN "A:"+hb_ntos( len( xVar ) ) - CASE cType == "O" - RETURN "" - OTHERWISE - RETURN "<"+cType+">" - ENDCASE - - RETURN xVar - /*----------------------------------------------------------------------*/ FUNCTION ConvertAFact( cMode, nFrom, xValue ) @@ -399,3 +358,22 @@ FUNCTION ConvertAFact( cMode, nFrom, xValue ) RETURN xValue /*----------------------------------------------------------------------*/ + +#if defined( __HB_DEBUG__ ) + +FUNCTION _HBXBP_DEBUG( ... ) + LOCAL cString := "" + + AEval( hb_AParams(), {| x | cString += ValType( x ) + ":" + iif( ISARRAY( x ), "[" + hb_ntos( Len( x ) ) + "]", hb_ValToStr( x ) ) + " " } ) + + #if defined( __PLATFORM__WINDOWS ) .AND. defined( __HB_WINDEBUG__ ) + wapi_OutputDebugString( cString ) + #else + hb_TraceString( cString ) + #endif + + RETURN NIL + +#endif + +/*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbphtmlviewer.prg b/harbour/contrib/hbxbp/xbphtmlviewer.prg index c5b5e1642b..daec414d97 100644 --- a/harbour/contrib/hbxbp/xbphtmlviewer.prg +++ b/harbour/contrib/hbxbp/xbphtmlviewer.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ @@ -224,7 +223,7 @@ METHOD XbpHTMLViewer:exeBlock( nEvent, p1 ) CASE nEvent == 7 CASE nEvent == 8 ::cSelectedText := ::oWidget:selectedText() -hb_outDebug( ::cSelectedText ) +HBXBP_DEBUG( ::cSelectedText ) CASE nEvent == 9 IF hb_isBlock( ::sl_statusTextChange ) eval( ::sl_statusTextChange, p1, NIL, Self ) diff --git a/harbour/contrib/hbxbp/xbplistbox.prg b/harbour/contrib/hbxbp/xbplistbox.prg index 1c412fe0ab..117cebeaf2 100644 --- a/harbour/contrib/hbxbp/xbplistbox.prg +++ b/harbour/contrib/hbxbp/xbplistbox.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpmenubar.prg b/harbour/contrib/hbxbp/xbpmenubar.prg index 9a2b694ad1..4891d2b47c 100644 --- a/harbour/contrib/hbxbp/xbpmenubar.prg +++ b/harbour/contrib/hbxbp/xbpmenubar.prg @@ -72,7 +72,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ @@ -261,11 +260,11 @@ METHOD xbpMenuBar:delItem( nItemIndex ) LOCAL lResult := .T. LOCAL oAction -//xbp_debug( nItemIndex, len( ::aMenuItems ), len( ::aMenuItems[ nItemIndex ] ) ) +//HBXBP_DEBUG( nItemIndex, len( ::aMenuItems ), len( ::aMenuItems[ nItemIndex ] ) ) IF nItemIndex > 0 .AND. nItemIndex <= ::numItems() IF ::aMenuItems[ nItemIndex, 1 ] == QMF_POPUP -//xbp_debug( valtype( ::aMenuItems[ nItemIndex, 4 ] ), __ObjGetClsName( ::aMenuItems[ nItemIndex, 4 ] ) ) +//HBXBP_DEBUG( valtype( ::aMenuItems[ nItemIndex, 4 ] ), __ObjGetClsName( ::aMenuItems[ nItemIndex, 4 ] ) ) //::aMenuItems[ nItemIndex, 4 ]:destroy() ELSE oAction := ::aMenuItems[ nItemIndex, 5 ] diff --git a/harbour/contrib/hbxbp/xbpmle.prg b/harbour/contrib/hbxbp/xbpmle.prg index ec9a34ef5c..8f2c39eb7d 100644 --- a/harbour/contrib/hbxbp/xbpmle.prg +++ b/harbour/contrib/hbxbp/xbpmle.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbppresspace.prg b/harbour/contrib/hbxbp/xbppresspace.prg index f8f344b1ec..d0bbf36587 100644 --- a/harbour/contrib/hbxbp/xbppresspace.prg +++ b/harbour/contrib/hbxbp/xbppresspace.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpprintdialog.prg b/harbour/contrib/hbxbp/xbpprintdialog.prg index 35a4655731..0ac5e06bc6 100644 --- a/harbour/contrib/hbxbp/xbpprintdialog.prg +++ b/harbour/contrib/hbxbp/xbpprintdialog.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpprinter.prg b/harbour/contrib/hbxbp/xbpprinter.prg index a83cbd4fc2..14674f2c94 100644 --- a/harbour/contrib/hbxbp/xbpprinter.prg +++ b/harbour/contrib/hbxbp/xbpprinter.prg @@ -71,7 +71,6 @@ #include "xbp.ch" #include "xbpdev.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbppushbutton.prg b/harbour/contrib/hbxbp/xbppushbutton.prg index cddcc57c28..8e6419749a 100644 --- a/harbour/contrib/hbxbp/xbppushbutton.prg +++ b/harbour/contrib/hbxbp/xbppushbutton.prg @@ -72,7 +72,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpradiobutton.prg b/harbour/contrib/hbxbp/xbpradiobutton.prg index 5f23a2eaa2..4e81409af7 100644 --- a/harbour/contrib/hbxbp/xbpradiobutton.prg +++ b/harbour/contrib/hbxbp/xbpradiobutton.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbprtf.prg b/harbour/contrib/hbxbp/xbprtf.prg index bd996666c1..b5836aa6ef 100644 --- a/harbour/contrib/hbxbp/xbprtf.prg +++ b/harbour/contrib/hbxbp/xbprtf.prg @@ -71,7 +71,6 @@ #include "xbp.ch" #include "gra.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpscrollbar.prg b/harbour/contrib/hbxbp/xbpscrollbar.prg index fceff4ce88..0a779da8f3 100644 --- a/harbour/contrib/hbxbp/xbpscrollbar.prg +++ b/harbour/contrib/hbxbp/xbpscrollbar.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpsle.prg b/harbour/contrib/hbxbp/xbpsle.prg index f8f31e1d86..4adbf8fc04 100644 --- a/harbour/contrib/hbxbp/xbpsle.prg +++ b/harbour/contrib/hbxbp/xbpsle.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ @@ -177,7 +176,7 @@ METHOD XbpSLE:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) METHOD XbpSLE:exeBlock( nMsg, p1, p2 ) LOCAL lRet := .F. -//hb_OutDebug( 'XbpSLE: '+hb_ntos( nMsg ) ) +//HBXBP_DEBUG( 'XbpSLE: '+hb_ntos( nMsg ) ) HB_SYMBOL_UNUSED( p1 ) DO CASE diff --git a/harbour/contrib/hbxbp/xbpspinbutton.prg b/harbour/contrib/hbxbp/xbpspinbutton.prg index e0e59738f2..eb0975b9a7 100644 --- a/harbour/contrib/hbxbp/xbpspinbutton.prg +++ b/harbour/contrib/hbxbp/xbpspinbutton.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ @@ -156,7 +155,7 @@ METHOD XbpSpinButton:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible #if 0 //////////////////////////////////// QT_QObject_InstallEventFilter( ::pWidget, SetEventFilter() ) -hb_outDebug( "XbpSpinButton:create 2" ) +HBXBP_DEBUG( "XbpSpinButton:create 2" ) ::connectEvent( ::pWidget, QEvent_FocusIn , {|o,e| ::exeBlock( 7, e, o ) } ) ::connectEvent( ::pWidget, QEvent_FocusOut, {|o,e| ::exeBlock( 8, e, o ) } ) ::connectEvent( ::pWidget, QEvent_KeyPress, {|o,e| ::exeBlock( 9, e, o ) } ) diff --git a/harbour/contrib/hbxbp/xbpstatic.prg b/harbour/contrib/hbxbp/xbpstatic.prg index 98ce5d9951..1311aabfdb 100644 --- a/harbour/contrib/hbxbp/xbpstatic.prg +++ b/harbour/contrib/hbxbp/xbpstatic.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpstatusbar.prg b/harbour/contrib/hbxbp/xbpstatusbar.prg index 3ab5928d7e..3c745cf5fc 100644 --- a/harbour/contrib/hbxbp/xbpstatusbar.prg +++ b/harbour/contrib/hbxbp/xbpstatusbar.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbpstyle.prg b/harbour/contrib/hbxbp/xbpstyle.prg index 7d79cb93b7..7dd30dceb9 100644 --- a/harbour/contrib/hbxbp/xbpstyle.prg +++ b/harbour/contrib/hbxbp/xbpstyle.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbptabpage.prg b/harbour/contrib/hbxbp/xbptabpage.prg index e8862b481e..366a548576 100644 --- a/harbour/contrib/hbxbp/xbptabpage.prg +++ b/harbour/contrib/hbxbp/xbptabpage.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ @@ -262,13 +261,13 @@ METHOD XbpTabWidget:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisib /*----------------------------------------------------------------------*/ METHOD XbpTabWidget:destroy() -//xbp_debug( " XbpTabWidget:destroy()",0 ) +//HBXBP_DEBUG( " XbpTabWidget:destroy()",0 ) ::oParent:oTabWidget := NIL // ::disconnect() ::xbpWindow:destroy() -//xbp_debug( " XbpTabWidget:destroy()",1 ) +//HBXBP_DEBUG( " XbpTabWidget:destroy()",1 ) RETURN NIL /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbptoolbar.prg b/harbour/contrib/hbxbp/xbptoolbar.prg index 548e1afa50..d0574b5392 100644 --- a/harbour/contrib/hbxbp/xbptoolbar.prg +++ b/harbour/contrib/hbxbp/xbptoolbar.prg @@ -72,7 +72,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbxbp/xbptreeview.prg b/harbour/contrib/hbxbp/xbptreeview.prg index f0865c0a9c..1ec33237db 100644 --- a/harbour/contrib/hbxbp/xbptreeview.prg +++ b/harbour/contrib/hbxbp/xbptreeview.prg @@ -70,7 +70,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ @@ -197,7 +196,7 @@ METHOD XbpTreeView:ExeBlock( nMsg, p1, p2 ) HB_SYMBOL_UNUSED( p1 ) HB_SYMBOL_UNUSED( p2 ) -//hb_outDebug( hb_ntos( nMsg ) ) +//HBXBP_DEBUG( hb_ntos( nMsg ) ) IF hb_isPointer( p1 ) IF ( n := ascan( ::aItems, {|o| o:oWidget:pPtr == p1 } ) ) > 0 @@ -251,7 +250,7 @@ METHOD XbpTreeView:destroy() ::disconnect() FOR i := len( ::aItems ) TO 1 step -1 -//xbp_debug( i, __ObjGetClsName( ::aItems[ i ] ) ) +//HBXBP_DEBUG( i, __ObjGetClsName( ::aItems[ i ] ) ) aeval( ::aItems[ i ]:aChilds, {|e,j| e := e, ::aItems[ i ]:aChilds[ j ] := NIL } ) ::aItems[ i ]:oWidget:pPtr := 0 NEXT diff --git a/harbour/contrib/hbxbp/xbpwindow.prg b/harbour/contrib/hbxbp/xbpwindow.prg index 53fe2e39dc..f71696ab30 100644 --- a/harbour/contrib/hbxbp/xbpwindow.prg +++ b/harbour/contrib/hbxbp/xbpwindow.prg @@ -71,7 +71,6 @@ #include "xbp.ch" #include "appevent.ch" -#include "hbqt.ch" /*----------------------------------------------------------------------*/ @@ -442,7 +441,7 @@ METHOD XbpWindow:grabEvent( nEvent, pEvent, oXbp ) HB_SYMBOL_UNUSED( oXbp ) -//xbp_debug( threadID(), "XbpWindow:grabEvent", nEvent ) +//HBXBP_DEBUG( threadID(), "XbpWindow:grabEvent", nEvent ) SWITCH ( nEvent ) @@ -721,11 +720,8 @@ METHOD XbpWindow:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible METHOD XbpWindow:destroy() LOCAL cXbp := __ObjGetClsName( self ) -//#define __debug__ -#ifdef __debug__ -xbp_Debug( ". " ) -xbp_Debug( ThreadID(),"Destroy: "+pad(__ObjGetClsName( self ),12)+ IF(empty(::cargo),'',str(::cargo) ), memory( 1001 ), hb_getMemUsed() ) -#endif +HBXBP_DEBUG( ". " ) +HBXBP_DEBUG( ThreadID(),"Destroy: "+pad(__ObjGetClsName( self ),12)+ IF(empty(::cargo),'',str(::cargo) ), memory( 1001 ), hb_getMemUsed() ) IF cXbp == "XBPDIALOG" SetEventLoop( NIL ) @@ -765,9 +761,8 @@ xbp_Debug( ThreadID(),"Destroy: "+pad(__ObjGetClsName( self ),12)+ IF(empty(::ca ::oWidget:pPtr := 0 ::oWidget := NIL -#ifdef __debug__ -xbp_Debug( ThreadID()," Destroy: "+pad(__ObjGetClsName( self ),12)+ IF(empty(::cargo),'',str(::cargo) ), memory( 1001 ), hb_getMemUsed() ) -#endif +HBXBP_DEBUG( ThreadID()," Destroy: "+pad(__ObjGetClsName( self ),12)+ IF(empty(::cargo),'',str(::cargo) ), memory( 1001 ), hb_getMemUsed() ) + RETURN NIL /*----------------------------------------------------------------------*/