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.
This commit is contained in:
Pritpal Bedi
2010-02-22 23:14:24 +00:00
parent 95fc69a2a6
commit e5e316e409
3 changed files with 66 additions and 12 deletions

View File

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

View File

@@ -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, "<HTML>" )
//aadd( aHtm, ' <BODY ALIGN=center VALIGN=center background="resources/harbour.png" bgproperties="fixed">' )
aadd( aHtm, ' <BODY ALIGN=center VALIGN=center>' )
aadd( aHtm, ' <H1><FONT color=green>' + "Welcome" + '</FONT></H1>' )
aadd( aHtm, ' <BR>' + '&nbsp;' + '</BR>' )
@@ -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 )

View File

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