From 33fd59434821b4ab771fcae8751c9d9db27d1538 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Mon, 10 Aug 2009 00:35:55 +0000 Subject: [PATCH] 2009-08-09 17:35 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/hbqt_slots.cpp * contrib/hbxbp/xbpbrowse.prg ! Improved speed. Reported by Viktor. --- harbour/ChangeLog | 5 +++++ harbour/contrib/hbqt/hbqt_slots.cpp | 2 ++ harbour/contrib/hbxbp/xbpbrowse.prg | 18 +++++++----------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 30c01e8d87..af2079f19c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-09 17:35 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbqt/hbqt_slots.cpp + * contrib/hbxbp/xbpbrowse.prg + ! Improved speed. Reported by Viktor. + 2009-08-09 17:10 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/hbqt.ch + Added more constants. diff --git a/harbour/contrib/hbqt/hbqt_slots.cpp b/harbour/contrib/hbqt/hbqt_slots.cpp index d37df87d50..0f0d56ed70 100644 --- a/harbour/contrib/hbqt/hbqt_slots.cpp +++ b/harbour/contrib/hbqt/hbqt_slots.cpp @@ -1881,6 +1881,8 @@ QVariant HbDbfModel::data( const QModelIndex & index, int role ) const case Qt::DecorationRole: { QVariant image = fetchRole( block, HBQT_BRW_CELLDECORATION, index.row()+1, index.column()+1 ); + if( image.toString() == ( QString ) "" ) + return( QVariant() ); return( QIcon( image.toString() ) ); //return( QPixmap( image.toString() ) ); } diff --git a/harbour/contrib/hbxbp/xbpbrowse.prg b/harbour/contrib/hbxbp/xbpbrowse.prg index de54321c89..45c7afbd4d 100644 --- a/harbour/contrib/hbxbp/xbpbrowse.prg +++ b/harbour/contrib/hbxbp/xbpbrowse.prg @@ -826,18 +826,14 @@ METHOD XbpBrowse:supplyInfo( nInfo, p2, p3 ) ENDIF CASE HBQT_BRW_CELLVALUE - IF ::columns[ p3 ]:type == XBPCOL_TYPE_TEXT - IF ::lFirst - ::lFirst := .f. - ::forceStable() - ::setVertScrollBarRange( .t. ) - ::setHorzScrollBarRange( .f. ) - ::oWidget:selectRow( ::rowPos - 1 ) - ENDIF - RETURN ::cellValue( p2, p3 ) - ELSE - RETURN "" + IF ::lFirst + ::lFirst := .f. + ::forceStable() + ::setVertScrollBarRange( .t. ) + ::setHorzScrollBarRange( .f. ) + ::oWidget:selectRow( ::rowPos - 1 ) ENDIF + RETURN ::cellValue( p2, p3 ) ENDSWITCH