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 <Psapi.h> to #include <psapi.h>.
    ! 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.
This commit is contained in:
Viktor Szakats
2009-11-15 08:44:27 +00:00
parent 3355607f87
commit e404195f36
41 changed files with 240 additions and 228 deletions

View File

@@ -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 <Psapi.h> to #include <psapi.h>.
! 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

View File

@@ -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),)

View File

@@ -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 )

View File

@@ -67,14 +67,10 @@
#ifndef _HBQT_CH
#if defined( __HB_OUTDEBUG__ )
#if defined( __PLATFORM__WINDOWS ) .AND. defined( __HB_WINDEBUG__ )
#xtranslate HB_OUTDEBUG( [<x>] ) => wapi_OutputDebugString( <x> )
#else
#xtranslate HB_OUTDEBUG( [<x>] ) => hb_TraceString( <x> )
#endif
#if defined( __HB_DEBUG__ )
#xtranslate HBQT_DEBUG( [<x,...>] ) => _HBQT_DEBUG( <x> )
#else
#xtranslate HB_OUTDEBUG( [<x>] ) => iif( .T.,, )
#xtranslate HBQT_DEBUG( [<x,...>] ) => iif( .T.,, )
#endif
#define QT_PTROF( oObj ) ( oObj:pPtr )

View File

@@ -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 */

View File

@@ -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 <Psapi.h>
#include <psapi.h>
#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

View File

@@ -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() )

View File

@@ -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 )

View File

@@ -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); "

View File

@@ -4,19 +4,15 @@
#ifndef _XBP_CH
#if defined( __HB_OUTDEBUG__ )
#if defined( __PLATFORM__WINDOWS ) .AND. defined( __HB_WINDEBUG__ )
#xtranslate HB_OUTDEBUG( [<x>] ) => wapi_OutputDebugString( <x> )
#else
#xtranslate HB_OUTDEBUG( [<x>] ) => hb_TraceString( <x> )
#endif
#if defined( __HB_DEBUG__ )
#xtranslate HBXBP_DEBUG( [<x,...>] ) => _HBXBP_DEBUG( <x> )
#else
#xtranslate HB_OUTDEBUG( [<x>] ) => iif( .T.,, )
#xtranslate HBXBP_DEBUG( [<x,...>] ) => iif( .T.,, )
#endif
/*----------------------------------------------------------------------*/
#define QT_PTROF( oObj ) ( oObj:pPtr )
#include "hbqt.ch"
#define HBXBP_EVENT_HANDLED 0
#define HBXBP_EVENT_UNHANDLED 1

View File

@@ -70,7 +70,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -65,9 +65,10 @@
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
#include "appevent.ch"
#include "hbqt.ch"
#include "appevent.ch"
/*----------------------------------------------------------------------*/
STATIC FUNCTION hbqt_QTranslateKey( kbm, key, shiftkey, altkey, controlkey )

View File

@@ -71,7 +71,6 @@
#include "xbp.ch"
#include "gra.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -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
/*----------------------------------------------------------------------*/

View File

@@ -70,7 +70,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -70,7 +70,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -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 )

View File

@@ -72,7 +72,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -70,7 +70,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -70,7 +70,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -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 "<OBJECT>"
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
/*----------------------------------------------------------------------*/

View File

@@ -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 )

View File

@@ -70,7 +70,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -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 ]

View File

@@ -70,7 +70,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -70,7 +70,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -70,7 +70,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -71,7 +71,6 @@
#include "xbp.ch"
#include "xbpdev.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -72,7 +72,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -70,7 +70,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -71,7 +71,6 @@
#include "xbp.ch"
#include "gra.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -70,7 +70,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -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

View File

@@ -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 ) } )

View File

@@ -70,7 +70,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -70,7 +70,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -70,7 +70,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -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
/*----------------------------------------------------------------------*/

View File

@@ -72,7 +72,6 @@
#include "xbp.ch"
#include "appevent.ch"
#include "hbqt.ch"
/*----------------------------------------------------------------------*/

View File

@@ -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

View File

@@ -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
/*----------------------------------------------------------------------*/