From e5e316e409ef8a4a92e7142acd7bce0591840c4e Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Mon, 22 Feb 2010 23:14:24 +0000 Subject: [PATCH] 2010-02-22 15:13 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/ideobject.prg ! :connect()/disconnect() now returns failure or success. * contrib/hbide/ideharbourhelp.prg % Fixed the night-haunter exiting GPF. Qt the beast. This all belongs to parent child relationship, which, if not handlled properly can kill the application. It is a moment to take sigh of relief, at least for now. --- harbour/ChangeLog | 9 ++++ harbour/contrib/hbide/ideharbourhelp.prg | 63 ++++++++++++++++++++---- harbour/contrib/hbide/ideobject.prg | 6 ++- 3 files changed, 66 insertions(+), 12 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index e4e0296a69..03bc434880 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,15 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-22 15:13 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbide/ideobject.prg + ! :connect()/disconnect() now returns failure or success. + * contrib/hbide/ideharbourhelp.prg + % Fixed the night-haunter exiting GPF. Qt the beast. + This all belongs to parent child relationship, which, + if not handlled properly can kill the application. + It is a moment to take sigh of relief, at least for now. + 2010-02-22 20:43 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/gtwvt/gtwvt.h * src/rtl/gtwvt/gtwvt.c diff --git a/harbour/contrib/hbide/ideharbourhelp.prg b/harbour/contrib/hbide/ideharbourhelp.prg index 1c2f44f44e..87ffe889a7 100644 --- a/harbour/contrib/hbide/ideharbourhelp.prg +++ b/harbour/contrib/hbide/ideharbourhelp.prg @@ -109,6 +109,7 @@ #define DOC_FUN_STATUS 13 #define DOC_FUN_PLATFORMS 14 #define DOC_FUN_SEEALSO 15 +#define DOC_FUN_VERSION 16 /*----------------------------------------------------------------------*/ @@ -129,6 +130,7 @@ CLASS IdeDocFunction DATA cStatus INIT "" DATA cPlatforms INIT "" DATA cSeaAlso INIT "" + DATA cVersion INIT "" DATA aSource INIT {} @@ -219,30 +221,62 @@ METHOD IdeHarbourHelp:create( oIde ) /*----------------------------------------------------------------------*/ METHOD IdeHarbourHelp:destroy() - #if 0 LOCAL a_ + + ::aHistory := NIL + ::aFuncByFile := NIL + + FOR EACH a_ IN ::aCategory + a_[ 4 ] := NIL // Reference to Contents node + NEXT + FOR EACH a_ IN ::aFunctions + a_[ 4 ] := NIL // Reference to Contents node + NEXT + + /* Contents Tab */ FOR EACH a_ IN ::aNodes IF a_[ 2 ] == "Function" - a_[ 1 ] := NIL + a_[ 3 ]:removeChild( a_[ 1 ] ) + a_[ 1 ] := NIL ; a_[ 3 ] := NIL ENDIF NEXT FOR EACH a_ IN ::aNodes IF a_[ 2 ] == "File" - a_[ 1 ] := NIL + a_[ 3 ]:removeChild( a_[ 1 ] ) + a_[ 1 ] := NIL ; a_[ 3 ] := NIL ENDIF NEXT FOR EACH a_ IN ::aNodes IF a_[ 2 ] == "Path" - a_[ 1 ] := NIL + a_[ 3 ]:removeChild( a_[ 1 ] ) + a_[ 1 ] := NIL ; a_[ 3 ] := NIL ENDIF NEXT ::aNodes[ 1, 1 ] := NIL + ::aNodes := NIL + ::disconnect( ::oUI:q_treeDoc, "itemSelectionChanged()" ) - ::aNodes := NIL - #endif + /* Index Tab */ - ::oUI:q_treeDoc:clear() - //::disconnect( ::oUI:q_treeDoc, "itemSelectionChanged()" ) + FOR EACH a_ IN ::aFunctions + a_[ 5 ] := NIL + NEXT + ::aFunctions := NIL + + /* Category Tab */ + FOR EACH a_ IN ::aCategory + IF a_[ 7 ] == " " + a_[ 6 ]:removeChild( a_[ 5 ] ) + a_[ 6 ] := NIL ; a_[ 5 ] := NIL + ENDIF + NEXT + FOR EACH a_ IN ::aCategory + IF a_[ 7 ] == "U" + a_[ 5 ] := NIL + ENDIF + NEXT + ::disconnect( ::oUI:q_treeCategory, "itemSelectionChanged()" ) + ::aCategory := NIL ::oUI:destroy() @@ -592,9 +626,11 @@ METHOD IdeHarbourHelp:populateIndex() FOR EACH a_ IN ::aFunctions oFunc := a_[ 3 ] IF !empty( oFunc:cCategory ) - aadd( ::aCategory, { oFunc:cCategory, oFunc:cSubCategory, oFunc, a_[ 4 ], NIL, NIL } ) IF ascan( aUnq, {|e_| e_[ 1 ] == oFunc:cCategory } ) == 0 aadd( aUnq, { oFunc:cCategory, NIL } ) + aadd( ::aCategory, { oFunc:cCategory, oFunc:cSubCategory, oFunc, a_[ 4 ], NIL, NIL, "U" } ) + ELSE + aadd( ::aCategory, { oFunc:cCategory, oFunc:cSubCategory, oFunc, a_[ 4 ], NIL, NIL, " " } ) ENDIF ENDIF NEXT @@ -688,6 +724,8 @@ METHOD IdeHarbourHelp:parseTextFile( cTextFile, oParent ) nPart := DOC_FUN_PLATFORMS CASE "$SEEALSO$" $ s nPart := DOC_FUN_SEEALSO + CASE "$VERSION$" $ s + nPart := DOC_FUN_VERSION OTHERWISE IF ! lIsFunc LOOP // It is a fake line not within $DOC$ => $END$ block @@ -742,6 +780,9 @@ METHOD IdeHarbourHelp:parseTextFile( cTextFile, oParent ) CASE DOC_FUN_SEEALSO oFunc:cSeaAlso := alltrim( s ) EXIT + CASE DOC_FUN_SEEALSO + oFunc:cVersion := alltrim( s ) + EXIT OTHERWISE nPart := DOC_FUN_NONE EXIT @@ -768,7 +809,6 @@ METHOD IdeHarbourHelp:populateRootInfo() LOCAL aHtm := {} aadd( aHtm, "" ) - //aadd( aHtm, ' ' ) aadd( aHtm, ' ' ) aadd( aHtm, '

' + "Welcome" + '

' ) aadd( aHtm, '
' + ' ' + '
' ) @@ -930,6 +970,9 @@ METHOD IdeHarbourHelp:buildView( oFunc ) aadd( aHtm, x + "Examples" + y ) aadd( aHtm, v + hbide_arrayToMemoHtml( oFunc:aExamples ) + w ) aadd( aHtm, z ) + aadd( aHtm, x + "Vesrion" + y ) + aadd( aHtm, v + oFunc:cVersion + w ) + aadd( aHtm, z ) aadd( aHtm, x + "Files" + y ) aadd( aHtm, v + hbide_arrayToMemoHtml( oFunc:aFiles ) + w ) aadd( aHtm, z ) diff --git a/harbour/contrib/hbide/ideobject.prg b/harbour/contrib/hbide/ideobject.prg index 90f0e29cf1..796556e83a 100644 --- a/harbour/contrib/hbide/ideobject.prg +++ b/harbour/contrib/hbide/ideobject.prg @@ -215,11 +215,12 @@ METHOD IdeObject:connect( qWidget, cSlot, bBlock ) IF !( Qt_Slots_Connect( ::pSlots, qWidget, cSlot, bBlock ) ) hbide_dbg( "Connection FAILED:", cSlot ) + RETURN .f. ELSE // hbide_dbg( "Connection SUCCEEDED:", cSlot ) ENDIF - RETURN Self + RETURN .t. /*----------------------------------------------------------------------*/ @@ -227,10 +228,11 @@ METHOD IdeObject:disConnect( qWidget, cSlot ) IF !( Qt_Slots_disConnect( ::pSlots, qWidget, cSlot ) ) hbide_dbg( "Dis-Connection FAILED:", cSlot ) + RETURN .f. ELSE // hbide_dbg( "Dis-Connection SUCCEEDED:", cSlot ) ENDIF - RETURN Self + RETURN .t. /*----------------------------------------------------------------------*/