From 4895ac7e80f0ecb27de27ec81068b76f9ea8cd1a Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Tue, 8 Dec 2009 07:45:20 +0000 Subject: [PATCH] 2009-12-07 23:43 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/hbqt_hbqtdbfmodel.cpp * contrib/hbqt/hbqt_slots.cpp * contrib/hbxbp/tests/demoxbp.prg ! Fixed unoperational demoxbp.exe. --- harbour/ChangeLog | 6 ++++++ harbour/contrib/hbqt/hbqt_hbqtdbfmodel.cpp | 6 +++--- harbour/contrib/hbqt/hbqt_slots.cpp | 17 ++++++++++------- harbour/contrib/hbxbp/tests/demoxbp.prg | 3 --- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2890718ac1..691612bcbd 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,12 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-07 23:43 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbqt/hbqt_hbqtdbfmodel.cpp + * contrib/hbqt/hbqt_slots.cpp + * contrib/hbxbp/tests/demoxbp.prg + ! Fixed unoperational demoxbp.exe. + 2009-12-08 04:07 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbcairo/core.c ! fixed code which operates on GC blocks and make both versions diff --git a/harbour/contrib/hbqt/hbqt_hbqtdbfmodel.cpp b/harbour/contrib/hbqt/hbqt_hbqtdbfmodel.cpp index 7efd12b8e4..d437b980cc 100644 --- a/harbour/contrib/hbqt/hbqt_hbqtdbfmodel.cpp +++ b/harbour/contrib/hbqt/hbqt_hbqtdbfmodel.cpp @@ -96,8 +96,6 @@ static QVariant hbqt_fetchRole( PHB_ITEM block, int what, int par1, int par2 ) hb_itemRelease( p1 ); hb_itemRelease( p2 ); - hb_vmRequestRestore(); - if( hb_itemType( ret ) & HB_IT_STRING ) { vv = hb_itemGetCPtr( ret ); @@ -126,6 +124,8 @@ hbqt_debug( " fetchRole[ d = %i ]", hb_itemGetND( ret ) ); hbqt_debug( " fetchRole[ n = %i ]", hb_itemGetNI( ret ) ); #endif } + + hb_vmRequestRestore(); } return vv; } @@ -208,7 +208,7 @@ hbqt_debug( "data - row=%i col=%i role=%i", index.row(), index.column(), role ); QVariant HbDbfModel::headerData( int section, Qt::Orientation orientation, int role ) const { #if defined( __HB_DEBUG__ ) -hbqt_debug( "headerData - section=%i orient=%i role=%i name=%s", section, orientation, role, objectName() ); +hbqt_debug( "headerData - section=%i orient=%i role=%i", section, orientation, role ); #endif if( orientation == Qt::Horizontal ) { diff --git a/harbour/contrib/hbqt/hbqt_slots.cpp b/harbour/contrib/hbqt/hbqt_slots.cpp index 7fc75e6a67..f328a84e7f 100644 --- a/harbour/contrib/hbqt/hbqt_slots.cpp +++ b/harbour/contrib/hbqt/hbqt_slots.cpp @@ -1106,7 +1106,7 @@ HB_FUNC( QT_DISCONNECT_SIGNAL ) s_s->listBlock[ i - 1 ] = NULL; bFreed = disconnect_signal( object, signal ); #if defined( __HB_DEBUG__ ) -hbqt_debug( " QT_DISCONNECT_SIGNAL: %s %s", ret ? "YES" : "NO", signal ); +hbqt_debug( " QT_DISCONNECT_SIGNAL: %s %s", bFreed ? "YES" : "NO", signal ); #endif } } @@ -1132,12 +1132,12 @@ bool Events::eventFilter( QObject * object, QEvent * event ) { QEvent::Type eventtype = event->type(); #if defined( __HB_DEBUG__ ) -hbqt_debug( "0 Events::eventFilter = %i", ( int ) eventtype ); +//hbqt_debug( "0 Events::eventFilter = %i", ( int ) eventtype ); #endif if( ( int ) eventtype == 0 ) { #if defined( __HB_DEBUG__ ) -hbqt_debug( "x Events::eventFilter = 0" ); +//hbqt_debug( "x Events::eventFilter = 0" ); #endif return false; } @@ -1148,7 +1148,7 @@ hbqt_debug( "x Events::eventFilter = 0" ); if( found == 0 ) { #if defined( __HB_DEBUG__ ) -hbqt_debug( "f Events::eventFilter = %s %i", " found=0", ( int ) eventtype ); +//hbqt_debug( "f Events::eventFilter = %s %i", " found=0", ( int ) eventtype ); #endif return false; } @@ -1160,11 +1160,11 @@ hbqt_debug( "f Events::eventFilter = %s %i", " found=0", ( int ) eventtyp PHB_ITEM pObject = hb_itemPutPtr( NULL, object ); PHB_ITEM pEvent = hb_itemPutPtr( NULL, event ); #if defined( __HB_DEBUG__ ) -hbqt_debug( "0 Events::eventFilter = %i", ( int ) eventtype ); +//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( __HB_DEBUG__ ) -hbqt_debug( "1 Events::eventFilter = %s", ret ? " yes" : " no" ); +//hbqt_debug( "1 Events::eventFilter = %s", ret ? " yes" : " no" ); #endif hb_itemRelease( pObject ); hb_itemRelease( pEvent ); @@ -1177,7 +1177,7 @@ hbqt_debug( "1 Events::eventFilter = %s", ret ? " yes" : " no" ); } } #if defined( __HB_DEBUG__ ) -hbqt_debug( "1 Events::eventFilter = %i", ( int ) eventtype ); +//hbqt_debug( "1 Events::eventFilter = %i", ( int ) eventtype ); #endif return ret; } @@ -1283,7 +1283,10 @@ MyMainWindow::~MyMainWindow( void ) hbqt_debug( " MyMainWindow::~MyMainWindow 0" ); #endif if( block ) + { hb_itemRelease( block ); + block = NULL; + } #if defined( __HB_DEBUG__ ) hbqt_debug( " MyMainWindow::~MyMainWindow 1" ); #endif diff --git a/harbour/contrib/hbxbp/tests/demoxbp.prg b/harbour/contrib/hbxbp/tests/demoxbp.prg index 6a16c5a70c..cd4830c4ff 100644 --- a/harbour/contrib/hbxbp/tests/demoxbp.prg +++ b/harbour/contrib/hbxbp/tests/demoxbp.prg @@ -1683,9 +1683,6 @@ FUNCTION Build_Browse( oWnd ) #ifdef __HARBOUR__ s := "selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5, stop: 0 #FF92BB, stop: 1 gray); " -// s := "HbTableView::item:hover { background-color: qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5, stop: 0 #FF92BB, stop: 1 red) }; " -// s += "HbTableView::item:focus { background-color: qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5, stop: 0 #FF92BB, stop: 1 blue) }; " -// s += "focus-background-color: qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5, stop: 0 #FF92BB, stop: 1 blue) ; " oXbpBrowse:setStyleSheet( s ) #endif