From ed1f17048bf92cdcdb0f1a89eff427d1fb9d7262 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Thu, 31 Mar 2011 19:59:20 +0000 Subject: [PATCH] 2011-03-31 12:55 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/ideharbourhelp.prg ! Fixed: a regression. * contrib/hbqt/hbmk2_qt.hbs ! Formatting. * contrib/hbqt/qtgui/hbqt_hbqgraphicsscene.cpp ! Formatting. * contrib/hbqt/tests/demoqt.prg ! QComboBox() demo code updated to insert items alphabetically. --- harbour/ChangeLog | 13 +++++++++++++ harbour/contrib/hbide/ideharbourhelp.prg | 5 +++-- harbour/contrib/hbqt/hbmk2_qt.hbs | 18 +++++++++--------- .../hbqt/qtgui/hbqt_hbqgraphicsscene.cpp | 8 ++++---- harbour/contrib/hbqt/tests/demoqt.prg | 3 ++- 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b2c98ae266..e7b2619992 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,19 @@ The license applies to all entries newer than 2009-04-28. */ +2011-03-31 12:55 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbide/ideharbourhelp.prg + ! Fixed: a regression. + + * contrib/hbqt/hbmk2_qt.hbs + ! Formatting. + + * contrib/hbqt/qtgui/hbqt_hbqgraphicsscene.cpp + ! Formatting. + + * contrib/hbqt/tests/demoqt.prg + ! QComboBox() demo code updated to insert items alphabetically. + 2011-03-31 10:03 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/hbqreportsmanager.prg * contrib/hbide/idedocks.prg diff --git a/harbour/contrib/hbide/ideharbourhelp.prg b/harbour/contrib/hbide/ideharbourhelp.prg index 8822488c86..04e95ddfff 100644 --- a/harbour/contrib/hbide/ideharbourhelp.prg +++ b/harbour/contrib/hbide/ideharbourhelp.prg @@ -365,7 +365,8 @@ METHOD IdeHarbourHelp:clear() FOR EACH a_ IN ::aCategory IF a_[ 7 ] == " " // a_[ 6 ]:removeChild( a_[ 5 ] ) - a_[ 6 ] := NIL ; a_[ 5 ] := NIL + a_[ 5 ] := NIL + a_[ 6 ] := NIL ENDIF NEXT FOR EACH a_ IN ::aCategory @@ -373,7 +374,7 @@ METHOD IdeHarbourHelp:clear() a_[ 5 ] := NIL ENDIF NEXT - ::aCategory := NIL + ::aCategory := {} ::oUI:q_treeDoc:clear() ::oUI:q_treeCategory:clear() diff --git a/harbour/contrib/hbqt/hbmk2_qt.hbs b/harbour/contrib/hbqt/hbmk2_qt.hbs index 4d7c280b12..3b8877aeed 100644 --- a/harbour/contrib/hbqt/hbmk2_qt.hbs +++ b/harbour/contrib/hbqt/hbmk2_qt.hbs @@ -1373,11 +1373,11 @@ METHOD HbQtSource:build() aadd( aLine, "" ) n := ascan( ::cls_, {|e_| left( lower( e_[ 1 ] ), 7 ) == "inherit" .and. !empty( e_[ 2 ] ) } ) - if n > 0 + IF n > 0 s := upper( strtran( ::cls_[ n, 2 ], "Q", "HB_Q" ) ) - else + ELSE s := "HBQTOBJECTHANDLER" - endif + ENDIF FOR EACH k IN hb_aTokens( s, "," ) aadd( aLine, "HB_FUNC_EXTERN( " + upper( alltrim( k ) ) + " );" ) NEXT @@ -1406,11 +1406,11 @@ METHOD HbQtSource:build() aadd( aLine, "#include " ) n := aScan( ::code_, {|e| "gcMark" $ e } ) IF !empty( ::code_ ) - if n == 0 - aeval( ::code_, {| e | aadd( aLine, StrTran( e, chr( 13 ) ) ) } ) - else + IF n == 0 + aeval( ::code_, {| e | aadd( aLine, StrTran( e, chr( 13 ) ) ) } ) + ELSE aeval( ::code_, {| e | aadd( aLine, StrTran( e, chr( 13 ) ) ) }, 1, n-1 ) - endif + ENDIF aadd( aLine, "" ) ENDIF @@ -1432,9 +1432,9 @@ METHOD HbQtSource:build() aadd( aLine, "} HBQT_GC_T_" + ::cQtObject + ";" ) aadd( aLine, " " ) aadd( aLine, " " ) - if( n > 0 ) + IF n > 0 aeval( ::code_, {| e | aadd( aLine, StrTran( e, chr( 13 ) ) ) }, n ) - endif + ENDIF aadd( aLine, " " ) aadd( aLine, " " ) diff --git a/harbour/contrib/hbqt/qtgui/hbqt_hbqgraphicsscene.cpp b/harbour/contrib/hbqt/qtgui/hbqt_hbqgraphicsscene.cpp index 12d7f145e7..8fee0fbcf0 100644 --- a/harbour/contrib/hbqt/qtgui/hbqt_hbqgraphicsscene.cpp +++ b/harbour/contrib/hbqt/qtgui/hbqt_hbqgraphicsscene.cpp @@ -496,10 +496,10 @@ void HBQGraphicsScene::dropEvent( QGraphicsSceneDragDropEvent * event ) // } } - hb_itemRelease( p1 ); - hb_itemRelease( p2 ); - hb_itemRelease( p3 ); - } + hb_itemRelease( p1 ); + hb_itemRelease( p2 ); + hb_itemRelease( p3 ); + } else { PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDrop ); diff --git a/harbour/contrib/hbqt/tests/demoqt.prg b/harbour/contrib/hbqt/tests/demoqt.prg index 93587ec2c5..a0d6409935 100644 --- a/harbour/contrib/hbqt/tests/demoqt.prg +++ b/harbour/contrib/hbqt/tests/demoqt.prg @@ -459,9 +459,10 @@ STATIC FUNCTION Build_Controls( oWnd ) oEdit:show() oComboBox := QComboBox( oWnd ) + oComboBox:setInsertPolicy( QComboBox_InsertAlphabetically ) + oComboBox:addItem( "Third" ) oComboBox:addItem( "First" ) oComboBox:addItem( "Second" ) - oComboBox:addItem( "Third" ) oComboBox:connect( "currentIndexChanged(int)", {|i| i := i, MsgInfo( oComboBox:itemText( i ) ) } ) oComboBox:move( 5, 60 ) oComboBox:resize( 345, 30 )