2011-03-28 01:19 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/qtcore/hbqt_hbqevents.cpp
  * contrib/hbqt/qtcore/hbqt_hbqslots.cpp
    ! Code cleanup.
  * contrib/hbqt/qtcore/hbqt_misc.prg
    ! Changed: :connect()/:disconnect() not to generate RTE.

  * contrib/hbxbp/xbpwindow.prg
    ! Misspelled :disconnect() [ Francessco ].

  * contrib/hbide/hbqreportsmanager.prg
  * contrib/hbide/hbqtoolbar.prg
  * contrib/hbide/idebrowse.prg
  * contrib/hbide/idedict.prg
  * contrib/hbide/idedocks.prg
  * contrib/hbide/ideeditor.prg
  * contrib/hbide/ideenviron.prg
  * contrib/hbide/ideformat.prg
  * contrib/hbide/idefunctions.prg
  * contrib/hbide/ideharbourhelp.prg
  * contrib/hbide/idehome.prg
  * contrib/hbide/idemain.prg
  * contrib/hbide/idemisc.prg
  * contrib/hbide/ideplugins.prg
  * contrib/hbide/ideprojmanager.prg
  * contrib/hbide/idesaveload.prg
  * contrib/hbide/ideshortcuts.prg
  * contrib/hbide/idesources.prg
  * contrib/hbide/idethemes.prg
  * contrib/hbide/idetools.prg
    ! Optimized: desructors.
      Now hbIDE has around 769 unreleased blocks if started afresh
      and exited without openening any source.
This commit is contained in:
Pritpal Bedi
2011-03-28 08:27:24 +00:00
parent a5fa7383a9
commit 72e2cdf475
25 changed files with 607 additions and 111 deletions

View File

@@ -16,6 +16,40 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-03-28 01:19 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtcore/hbqt_hbqevents.cpp
* contrib/hbqt/qtcore/hbqt_hbqslots.cpp
! Code cleanup.
* contrib/hbqt/qtcore/hbqt_misc.prg
! Changed: :connect()/:disconnect() not to generate RTE.
* contrib/hbxbp/xbpwindow.prg
! Misspelled :disconnect() [ Francessco ].
* contrib/hbide/hbqreportsmanager.prg
* contrib/hbide/hbqtoolbar.prg
* contrib/hbide/idebrowse.prg
* contrib/hbide/idedict.prg
* contrib/hbide/idedocks.prg
* contrib/hbide/ideeditor.prg
* contrib/hbide/ideenviron.prg
* contrib/hbide/ideformat.prg
* contrib/hbide/idefunctions.prg
* contrib/hbide/ideharbourhelp.prg
* contrib/hbide/idehome.prg
* contrib/hbide/idemain.prg
* contrib/hbide/idemisc.prg
* contrib/hbide/ideplugins.prg
* contrib/hbide/ideprojmanager.prg
* contrib/hbide/idesaveload.prg
* contrib/hbide/ideshortcuts.prg
* contrib/hbide/idesources.prg
* contrib/hbide/idethemes.prg
* contrib/hbide/idetools.prg
! Optimized: desructors.
Now hbIDE has around 769 unreleased blocks if started afresh
and exited without openening any source.
2011-03-27 12:45 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
* harbour/src/rtl/hbrandom.c

View File

@@ -293,6 +293,52 @@ METHOD HbqReportsManager:create( qParent )
/*----------------------------------------------------------------------*/
METHOD HbqReportsManager:destroy()
::aSources := NIL
::aPages := NIL
::qToolbar := NIL
::qToolbarAlign := NIL
::qToolbarL := NIL
::qLayoutD := NIL
::qSpliter := NIL
::qFrameL := NIL
::qScene := NIL
::qView := NIL
::qFrameR := NIL
::qLayL := NIL
::qSplL := NIL
::qLayR := NIL
::qTabL0 := NIL
::qTabL1 := NIL
::qTabR1 := NIL
::qPageL01 := NIL
::qPageL02 := NIL
::qPageL11 := NIL
::qTreeObjects := NIL
::qPageL12 := NIL
::qTreeProp := NIL
::qEditDesc := NIL
::qSplR := NIL
::qPageR11 := NIL
::qPageR12 := NIL
::qPageR13 := NIL
::qPageR11Lay := NIL
::qTreeData := NIL
::qPageR11Lay := NIL
RETURN Self
/*----------------------------------------------------------------------*/

View File

@@ -152,8 +152,18 @@ METHOD HbqToolbar:onError( ... )
/*----------------------------------------------------------------------*/
METHOD HbqToolbar:destroy()
LOCAL xTmp
::oWidget := NIL
FOR EACH xTmp IN ::hItems
IF xTmp:className() == "QTOOLBUTTON"
xTmp:disconnect( QEvent_MouseButtonPress )
xTmp:disconnect( QEvent_MouseButtonRelease )
xTmp:disconnect( QEvent_MouseMove )
xTmp:disconnect( QEvent_Enter )
xTmp:disconnect( "clicked()" )
ENDIF
xTmp := NIL
NEXT
::cName := NIL
::oParent := NIL
::hItems := NIL
@@ -170,6 +180,7 @@ METHOD HbqToolbar:destroy()
::qDropAction := NIL
::qPix := NIL
::qByte := NIL
::oWidget := NIL
RETURN Self

View File

@@ -57,7 +57,7 @@
*
* Harbour-Qt IDE
*
* Pritpal Bedi <pritpal@vouchcac.com>
* Pritpal Bedi <bedipritpal@hotmail.com>
* 27Jun2010
*/
/*----------------------------------------------------------------------*/
@@ -266,12 +266,82 @@ METHOD IdeBrowseManager:setStyleSheet( nMode )
/*------------------------------------------------------------------------*/
METHOD IdeBrowseManager:destroy()
LOCAL oPanel
LOCAL oPanel, qDock, qAct, qBtn
::qRddCombo:disconnect( "currentIndexChanged(QString)" )
::qTablesButton:disconnect( "clicked()" )
::qIndexButton:disconnect( "clicked()" )
::qPanelsButton:disconnect( "clicked()" )
IF !empty( ::qTimer )
::qTimer:disconnect( "timeout()" )
::qTimer:stop()
::qTimer := nil
ENDIF
qDock := ::oIde:oEM:oQScintillaDock:oWidget
qDock:setWidget( QWidget() )
qDock:disconnect( QEvent_DragEnter )
qDock:disconnect( QEvent_Drop )
IF !empty( ::qStruct )
::qStruct:disconnect( QEvent_Close )
::qStruct:q_tableFields:disconnect( "itemSelectionChanged()" )
::qStruct:q_buttonCopyStruct:disconnect( "clicked()" )
::qStruct:q_tableFields:clearContents()
::qStruct:destroy()
::qStruct := NIL
ENDIF
FOR EACH qAct IN ::aIndexAct
qAct:disconnect( "triggered(bool)" )
qAct := NIL
NEXT
FOR EACH qAct IN ::aPanelsAct
qAct:disconnect( "triggered(bool)" )
qAct := NIL
NEXT
FOR EACH qBtn IN ::aToolBtns
qBtn:disconnect( "clicked()" )
qBtn := NIL
NEXT
FOR EACH oPanel IN ::aPanels
oPanel:destroy()
NEXT
::aPanels := {}
::aPanels := NIL
::qDbu := NIL
::qStack := NIL
::qLayout := NIL
::qVSplitter := NIL
::qToolBar := NIL
::qToolBarL := NIL
::qStruct := NIL
::qRddCombo := NIL
::qConxnCombo := NIL
::qStatus := NIL
::qTimer := NIL
::aStatusPnls := NIL
::aPanels := NIL
::aToolBtns := NIL
::aButtons := NIL
::aIndexAct := NIL
::aRdds := NIL
::aConxns := NIL
::oCurBrw := NIL
::oCurPanel := NIL
::qPanelsMenu := NIL
::qIndexMenu := NIL
::qTablesMenu := NIL
::qPanelsButton := NIL
::qIndexButton := NIL
::qTablesButton := NIL
::aPanelsAct := NIL
RETURN Self
@@ -463,7 +533,8 @@ METHOD IdeBrowseManager:addPanel( cPanel )
METHOD IdeBrowseManager:addPanelsMenu( cPanel )
LOCAL qAct
( qAct := ::qPanelsMenu:addAction( cPanel ) ):setIcon( hbide_image( "panel_7" ) )
qAct := ::qPanelsMenu:addAction( cPanel )
qAct:setIcon( hbide_image( "panel_7" ) )
qAct:connect( "triggered(bool)", {|| ::setPanel( cPanel ) } )
aadd( ::aPanelsAct, qAct )
@@ -739,6 +810,7 @@ METHOD IdeBrowseManager:showTablesTree()
oUI:exec()
oUI:q_buttonOk:disconnect( "clicked()" )
::oIde:oINI:cTablesDialogGeometry := hbide_posAndSize( oUI:oWidget )
oUI:destroy()
RETURN Self
@@ -1218,12 +1290,20 @@ METHOD IdeBrowsePanel:new( oIde, cPanel, oManager )
METHOD IdeBrowsePanel:destroy()
LOCAL aBrw, oSub
::qWidget:disconnect( "subWindowActivated(QMdiSubWindow*)" )
FOR EACH aBrw IN ::aBrowsers
oSub := aBrw[ SUB_WINDOW ]
::qWidget:removeSubWindow( oSub )
aBrw[ SUB_BROWSER ]:destroy()
oSub := NIL
aBrw := NIL
NEXT
::aBrowsers := NIL
::qMenuWindows := NIL
::qStruct := NIL
::qWidget := NIL
RETURN Self
@@ -1702,6 +1782,11 @@ METHOD IdeBrowse:create( oIde, oManager, oPanel, aInfo )
METHOD IdeBrowse:destroy()
IF !empty( ::qTimer )
::qTimer:disconnect( "timeout()" )
::qTimer := NIL
ENDIF
IF ! empty( ::qMdi )
* ::qMdi:disconnect( "aboutToActivate()" )
::qMdi:disconnect( "windowStateChanged(Qt::WindowStates,Qt::WindowStates)" )
@@ -1717,6 +1802,7 @@ METHOD IdeBrowse:destroy()
ENDIF
::oManager:oCurBrw := NIL
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/

View File

@@ -142,6 +142,15 @@ METHOD IdeDictionary:create( oIde )
METHOD IdeDictionary:destroy()
::cDictInfo := NIL
::cFilename := NIL
::lCaseSensitive := NIL
::cConvMode := NIL
::lAutoComplete := NIL
::cBgColor := NIL
::qBgColor := NIL
::aItems := NIL
RETURN Self
/*----------------------------------------------------------------------*/

View File

@@ -209,6 +209,16 @@ METHOD IdeDocks:destroy()
::oIde:oSys : disconnect( "activated(QSystemTrayIcon::ActivationReason)" )
::qAct1 : disconnect( "triggered(bool)" )
::qAct2 : disconnect( "triggered(bool)" )
::oIde:oSys := NIL
::qAct1 := NIL
::qAct2 := NIL
ENDIF
IF !empty( ::qTimer )
::qTimer:disconnect( "timeout()" )
::qTimer:stop()
::qTimer := NIL
ENDIF
::oIde:oOutputResult := NIL
@@ -232,10 +242,16 @@ METHOD IdeDocks:destroy()
::oIde:oDockED := NIL
::oIde:oDockB2 := NIL
::oIde:oDockB1 := NIL
::oIde:oLinkResult := NIL
::oIde:oSys := NIL
::qAct1 := NIL
::qAct2 := NIL
::oIde:oDockB := NIL
::oIde:oCompileResult := NIL
FOR EACH qTmp IN ::aPanels
qTmp:disconnect( "clicked()" )
qTmp := NIL
@@ -255,20 +271,21 @@ METHOD IdeDocks:destroy()
qTmp := NIL
NEXT
::qMdiToolBar:destroy()
::qMdiToolBar := NIL
::qMdiToolBarL:destroy()
::qMdiToolBarL := NIL
::nPass := NIL
::aPanels := NIL
::aMdiBtns := NIL
::aBtnLines := NIL
::aBtnDocks := NIL
::oBtnTabClose := NIL
::qMdiToolBar := NIL
::qMdiToolBarL := NIL
::aViewsInfo := NIL
::qTBtnClose := NIL
::qTimer := NIL
::nPrevWindowState := NIL
::qAct1 := NIL
::qAct2 := NIL
RETURN Self

View File

@@ -190,14 +190,33 @@ METHOD IdeEditsManager:new( oIde )
/*----------------------------------------------------------------------*/
METHOD IdeEditsManager:setStyleSheet( nMode )
METHOD IdeEditsManager:destroy()
LOCAL a_
::qContextMenu:setStyleSheet( GetStyleSheet( "QMenuPop", nMode ) )
::qContextSub:setStyleSheet( GetStyleSheet( "QMenuPop", nMode ) )
::qCompleter:disconnect( "activated(QString)" )
::oIde:qCompModel := NIL
::oIde:qProtoList := NIL
FOR EACH a_ IN ::aActions
a_[ 2 ] := NIL
a_:= NIL
NEXT
::aActions := NIL
::aProtos := NIL
::qContextMenu := NIL
::qFldsStrList := NIL
::qFldsModel := NIL
FOR EACH a_ IN ::oIde:aTabs
a_[ 2 ]:destroy()
a_:= NIL
NEXT
RETURN Self
/*------------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
METHOD IdeEditsManager:create( oIde )
@@ -248,6 +267,15 @@ METHOD IdeEditsManager:create( oIde )
/*----------------------------------------------------------------------*/
METHOD IdeEditsManager:setStyleSheet( nMode )
::qContextMenu:setStyleSheet( GetStyleSheet( "QMenuPop", nMode ) )
::qContextSub:setStyleSheet( GetStyleSheet( "QMenuPop", nMode ) )
RETURN Self
/*------------------------------------------------------------------------*/
METHOD IdeEditsManager:updateFieldsList( cAlias )
LOCAL aFlds
@@ -279,7 +307,7 @@ METHOD IdeEditsManager:updateCompleter()
aHrb := ::oHL:getFunctionPrototypes()
aUsr := hbide_getUserPrototypes()
::qCompleter:disconnect( "activated(QString)", {|p| ::execEvent( "qcompleter_activated", p ) } )
::qCompleter:disconnect( "activated(QString)" )
::aProtos := {}
aeval( aHrb, {|e| aadd( ::aProtos, e ) } )
@@ -341,24 +369,6 @@ METHOD IdeEditsManager:getProto( cWord )
/*----------------------------------------------------------------------*/
METHOD IdeEditsManager:destroy()
LOCAL a_
::qCompleter:disconnect( "activated(QString)" )
::oIde:qCompModel := NIL
::oIde:qProtoList := NIL
::oIde:qCompleter := NIL
FOR EACH a_ IN ::aActions
a_[ 2 ] := NIL
NEXT
::aActions := NIL
::qContextMenu := NIL
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeEditsManager:removeSourceInTree( cSourceFile )
LOCAL n
@@ -1420,6 +1430,7 @@ METHOD IdeEditor:split( nOrient, oEditP )
METHOD IdeEditor:destroy()
LOCAL n, oEdit
HB_TRACE( HB_TR_ALWAYS, "..........................................................IdeEditor:destroy()", 0 )
::oEdit:qEdit:disconnect( "updateRequest(QRect,int)" )
IF !empty( ::qTimerSave )
@@ -1432,9 +1443,10 @@ METHOD IdeEditor:destroy()
::qHiliter := NIL
::qCqEdit := NIL
::qCoEdit := NIL
::qEdit := NIL
::qCqEdit := NIL
::qCoEdit := NIL
::qEdit := NIL
DO WHILE len( ::aEdits ) > 0
oEdit := ::aEdits[ 1 ]
hb_adel( ::aEdits, 1, .t. )
@@ -1447,14 +1459,11 @@ METHOD IdeEditor:destroy()
ENDIF
IF !Empty( ::qHiliter )
::qHiliter := NIL
::qHiliter := NIL
ENDIF
::oEdit := NIL
IF !Empty( ::qLayout )
::qLayout := NIL
ENDIF
::qLayout := NIL
IF ( n := ascan( ::aTabs, {|e_| e_[ TAB_OEDITOR ] == Self } ) ) > 0
hb_adel( ::oIde:aTabs, n, .T. )
@@ -1471,7 +1480,7 @@ METHOD IdeEditor:destroy()
::oIde:lDockRVisible := .f.
ENDIF
ENDIF
HB_TRACE( HB_TR_ALWAYS, "................................................................IdeEditor:destroy()", 1 )
RETURN Self
/*----------------------------------------------------------------------*/

View File

@@ -126,6 +126,11 @@ METHOD IdeEnvironments:destroy()
::oUI_1:destroy()
ENDIF
::aNames := NIL
::aEnvrns := NIL
::aShellContents := NIL
::aCommons := NIL
RETURN Self
/*------------------------------------------------------------------------*/

View File

@@ -110,6 +110,15 @@ METHOD IdeFormat:create( oIde )
METHOD IdeFormat:destroy()
IF !empty( ::oUI )
::oUI:q_btnEditCmnds:disconnect( "clicked()" )
::oUI:q_btnStart :disconnect( "clicked()" )
::oUI:q_btnCancel :disconnect( "clicked()" )
::oUI:q_btnUpdSrc :disconnect( "clicked()" )
::oUI:q_checkSelOnly:disconnect( "stateChanged(int)" )
::qEdit := NIL
::qHiliter := NIL
::oFormat := NIL
::oUI:destroy()
ENDIF

View File

@@ -593,7 +593,6 @@ METHOD IdeFunctions:consolidateList()
METHOD IdeFunctions:populateTable()
LOCAL oTbl, qItm, a_, n
LOCAL qApp := QApplication()
::clear( .t. )
::buildHeader()
@@ -610,7 +609,7 @@ METHOD IdeFunctions:populateTable()
oTbl:setItem( n, 0, qItm )
oTbl:setRowHeight( n, 16 )
qApp:processEvents()
QApplication():processEvents()
aadd( ::aItems, qItm )
n++

View File

@@ -125,11 +125,42 @@ CLASS IdeDocFunction
DATA lOk INIT .f.
METHOD new() INLINE Self
METHOD destroy()
ENDCLASS
/*----------------------------------------------------------------------*/
METHOD IdeDocFunction:destroy()
::cName := NIL
::cTemplate := NIL
::cCategory := NIL
::cSubCategory := NIL
::cOneliner := NIL
::cStatus := NIL
::cPlatforms := NIL
::cSeeAlso := NIL
::cVersion := NIL
::cInherits := NIL
::cExternalLink := NIL
::aSyntax := NIL
::aArguments := NIL
::aReturns := NIL
::aDescription := NIL
::aExamples := NIL
::aTests := NIL
::aFiles := NIL
::aMethods := NIL
::aSource := NIL
::oTVItem := NIL
::cSourceTxt := NIL
::lOk := NIL
RETURN NIL
/*----------------------------------------------------------------------*/
CLASS IdeHarbourHelp INHERIT IdeObject
DATA oUI
@@ -235,9 +266,25 @@ METHOD IdeHarbourHelp:destroy()
LOCAL aTmp, oFun
IF ! empty( ::oUI )
::oUI:q_treeDoc:disconnect( "itemSelectionChanged()" )
::oUI:q_treeCategory:disconnect( "itemSelectionChanged()" )
::oUI:q_buttonInstall :disconnect( "clicked()" )
::oUI:q_buttonHome :disconnect( "clicked()" )
::oUI:q_buttonBackward :disconnect( "clicked()" )
::oUI:q_buttonForward :disconnect( "clicked()" )
::oUI:q_buttonUp :disconnect( "clicked()" )
::oUI:q_buttonRefresh :disconnect( "clicked()" )
::oUI:q_buttonPrint :disconnect( "clicked()" )
::oUI:q_buttonPdf :disconnect( "clicked()" )
::oUI:q_browserView :disconnect( "anchorClicked(QUrl)" )
::oUI:q_tabWidgetContents:disconnect( "currentChanged(int)" )
::oUI:q_editInstall :disconnect( "textChanged(QString)" )
::oUI:q_editIndex :disconnect( "textChanged(QString)" )
::oUI:q_editIndex :disconnect( "returnPressed()" )
::oUI:q_listIndex :disconnect( "itemDoubleClicked(QListWidgetItem*)" )
::oUI:q_treeDoc :disconnect( "itemSelectionChanged()" )
::oUI:q_treeCategory :disconnect( "itemSelectionChanged()" )
::clear()
::oUI:destroy()
ENDIF
@@ -246,6 +293,7 @@ METHOD IdeHarbourHelp:destroy()
FOR EACH aTmp IN ::aFuncByFile
aTmp[ 1 ] := NIL
FOR EACH oFun IN aTmp[ 2 ]
oFun:destroy()
oFun := NIL
NEXT
aTmp[ 2 ] := NIL
@@ -256,12 +304,13 @@ METHOD IdeHarbourHelp:destroy()
::aCategory := NIL
::nCurTVItem := NIL
::nCurInHist := NIL
::qHiliter := NIL
::hIndex := NIL
::aProtoTypes := NIL
::lLoadedProto := NIL
::aFuncDefs := NIL
::qHiliter := NIL
RETURN Self
/*----------------------------------------------------------------------*/
@@ -282,20 +331,20 @@ METHOD IdeHarbourHelp:clear()
/* Contents Tab */
FOR EACH a_ IN ::aNodes
IF a_[ 2 ] == "Function"
a_[ 3 ]:removeChild( a_[ 1 ] )
// a_[ 3 ]:removeChild( a_[ 1 ] )
a_[ 1 ] := NIL ; a_[ 3 ] := NIL
ENDIF
NEXT
FOR EACH a_ IN ::aNodes
IF a_[ 2 ] == "File"
a_[ 3 ]:removeChild( a_[ 1 ] )
// a_[ 3 ]:removeChild( a_[ 1 ] )
a_[ 1 ] := NIL ; a_[ 3 ] := NIL
ENDIF
NEXT
FOR EACH a_ IN ::aNodes
IF a_[ 2 ] == "Path"
IF hb_isObject( a_[ 3 ] )
a_[ 3 ]:removeChild( a_[ 1 ] )
// a_[ 3 ]:removeChild( a_[ 1 ] )
a_[ 3 ] := NIL
ENDIF
a_[ 1 ] := NIL
@@ -315,7 +364,7 @@ METHOD IdeHarbourHelp:clear()
/* Category Tab */
FOR EACH a_ IN ::aCategory
IF a_[ 7 ] == " "
a_[ 6 ]:removeChild( a_[ 5 ] )
// a_[ 6 ]:removeChild( a_[ 5 ] )
a_[ 6 ] := NIL ; a_[ 5 ] := NIL
ENDIF
NEXT
@@ -324,7 +373,7 @@ METHOD IdeHarbourHelp:clear()
a_[ 5 ] := NIL
ENDIF
NEXT
::aCategory := {}
::aCategory := NIL
::oUI:q_treeDoc:clear()
::oUI:q_treeCategory:clear()

View File

@@ -164,7 +164,9 @@ METHOD IdeHome:destroy()
::qWelcomeBrowser:disconnect( "customContextMenuRequested(QPoint)" )
::qFaqBrowser:disconnect( "customContextMenuRequested(QPoint)" )
::oWelcomeTab := NIL
::qWelcomeBrowser := NIL
::qCurBrowser := NIL
RETURN Self

View File

@@ -102,7 +102,7 @@ REQUEST ADS
/*----------------------------------------------------------------------*/
PROCEDURE Main( ... )
LOCAL oIde
LOCAL oIde, oTmp
#ifdef __HBDYNLOAD__RDDADS__
LOCAL hRDDADS
@@ -137,8 +137,11 @@ PROCEDURE Main( ... )
QResource():registerResource_1( hbqtres_HbIde(), ":/resource" )
oIde := HbIde():new( hb_aParams() ):create()
oTmp := HbIde():new( hb_aParams() )
oIde := oTmp:create()
oIde:destroy()
oTmp := NIL
oIde := NIL
RETURN
@@ -363,6 +366,7 @@ CLASS HbIde
/*----------------------------------------------------------------------*/
METHOD HbIde:destroy()
LOCAL xTmp
/* Very important - destroy resources */
HB_TRACE( HB_TR_ALWAYS, "------------------------------------------------------" )
@@ -376,9 +380,9 @@ METHOD HbIde:destroy()
::oSetup:destroy()
::oUpdn:destroy()
::oHL:destroy()
::oDK:destroy()
::oHM:destroy()
::oSK:destroy()
::oFR:destroy()
::oFF:destroy()
::oSearchReplace:destroy()
@@ -393,12 +397,124 @@ METHOD HbIde:destroy()
::oPM:destroy()
::oRM:destroy()
//::oEM:destroy() /* Almost GPF's */
::oBM:destroy()
::oSM:destroy()
::oEM:destroy()
::oAC:destroy()
::oDK:destroy()
::oDA := NIL
::oDlg:destroy()
::oFont := NIL
::oINI:destroy()
::oFmt:destroy()
FOR EACH xTmp IN ::aUserDict
xTmp:destroy()
NEXT
FOR EACH xTmp IN ::aSkltns
xTmp[ 1 ] := NIL
xTmp[ 2 ] := NIL
NEXT
::oFont := NIL
::oTH := NIL
::aMeta := NIL
::mp1 := NIL
::mp2 := NIL
::oXbp := NIL
::nEvent := NIL
::aTabs := NIL
::aViews := NIL
::aMdies := NIL
::aProjData := NIL
::aPrpObjs := NIL
::aEditorPath := NIL
::aSrcOnCmdLine := NIL
::aHbpOnCmdLine := NIL
::oTabParent := NIL
::oFrame := NIL
::aTags := NIL
::aText := NIL
::aSkltns := NIL
::aSources := NIL
::aFuncList := NIL
::aLines := NIL
::aComments := NIL
::aProjects := NIL
::aUserDict := NIL
::aMarkTBtns := NIL
//
::oStackedWidget := NIL
::oStackedWidgetMisc := NIL
::oFont := NIL
::oProjTree := NIL
::oEditTree := NIL
::oFuncList := NIL
::oOutputResult := NIL
::oCompileResult := NIL
::oLinkResult := NIL
::oNewDlg := NIL
::oPBFind := NIL
::oPBRepl := NIL
::oPBClose := NIL
::oFind := NIL
::oRepl := NIL
::oCurProjItem := NIL
::oCurProject := NIL
::oProjRoot := NIL
::oExes := NIL
::oLibs := NIL
::oDlls := NIL
::oProps := NIL
::oGeneral := NIL
::oSearchReplace := NIL
::oMainToolbar := NIL
::oDockR := NIL
::oDockB := NIL
::oDockB1 := NIL
::oDockB2 := NIL
::oDockPT := NIL
::oDockED := NIL
::oThemesDock := NIL
::oPropertiesDock := NIL
::oEnvironDock := NIL
::oFuncDock := NIL
::oDocViewDock := NIL
::oDocWriteDock := NIL
::oFunctionsDock := NIL
::oSkltnsTreeDock := NIL
::oHelpDock := NIL
::oSkeltnDock := NIL
::oFindDock := NIL
::oSourceThumbnailDock := NIL
::oQScintillaDock := NIL
::oUpDn := NIL
::oReportsManagerDock := NIL
::oFormatDock := NIL
::lClosing := NIL
::lStatusBarVisible := NIL
::nModeUI := NIL
::oSys := NIL
::oSysMenu := NIL
::qLayout := NIL
::qTabWidget := NIL
::qLayoutFrame := NIL
::qViewsCombo := NIL
::qFindDlg := NIL
::qFontWrkProject := NIL
::qBrushWrkProject := NIL
::qProcess := NIL
::qHelpBrw := NIL
::qTBarLines := NIL
::qTBarPanels := NIL
::qTBarDocks := NIL
::qAnimateAction := NIL
::qStatusBarAction := NIL
::qCompModel := NIL
::qProtoList := NIL
HB_TRACE( HB_TR_ALWAYS, " " )
HB_TRACE( HB_TR_ALWAYS, "After ::oIde:destroy()", memory( 1001 ) )
@@ -444,7 +560,7 @@ METHOD HbIde:create( aParams )
::oFont:create( "10.Courier" )
/* Functions Tag Manager */
::oFN := IdeFunctions():new():create( Self )
::oFN := IdeFunctions():new( Self ):create()
/* Skeletons Manager */
::oSK := IdeSkeletons():new( Self ):create()
@@ -649,6 +765,9 @@ METHOD HbIde:create( aParams )
ENDDO
DbCloseAll()
::cProjIni := NIL
hbide_setIde( NIL )
hbide_destroyPlugins()
RETURN self

View File

@@ -85,7 +85,7 @@ FUNCTION hbide_setIde( oIde )
LOCAL oldIde
STATIC ide
oldIde := ide
IF hb_isObject( oIde )
IF PCount() > 0
ide := oIde
ENDIF
RETURN oldIde

View File

@@ -316,3 +316,13 @@ FUNCTION hbide_execScriptFunction( cFunc, ... )
RETURN NIL
/*----------------------------------------------------------------------*/
FUNCTION hbide_destroyPlugins()
s_aPlugins := NIL
s_aLoaded := NIL
s_aPersist := NIL
RETURN NIL
/*----------------------------------------------------------------------*/

View File

@@ -299,9 +299,27 @@ METHOD IdeProjManager:create( oIDE )
METHOD IdeProjManager:destroy()
IF !empty( ::oUI )
::oUI:q_buttonCn :disconnect( "clicked()" )
::oUI:q_buttonSave :disconnect( "clicked()" )
::oUI:q_buttonSaveExit :disconnect( "clicked()" )
::oUI:q_buttonSelect :disconnect( "clicked()" )
::oUI:q_buttonUp :disconnect( "clicked()" )
::oUI:q_buttonDown :disconnect( "clicked()" )
// ::oUI:q_buttonSort :disconnect( "clicked()" )
// ::oUI:q_buttonSortZA :disconnect( "clicked()" )
// ::oUI:q_buttonSortOrg :disconnect( "clicked()" )
::oUI:q_tabWidget :disconnect( "currentChanged(int)" )
::oUI:q_buttonChoosePrjLoc:disconnect( "clicked()" )
::oUI:q_buttonChooseWd :disconnect( "clicked()" )
::oUI:q_buttonChooseDest :disconnect( "clicked()" )
::oUI:q_buttonBackup :disconnect( "clicked()" )
::oUI:q_editPrjLoctn :disconnect( "textChanged(QString)" )
::oUI:destroy()
ENDIF
::aPrjProps := NIL
RETURN Self
/*----------------------------------------------------------------------*/
@@ -1149,6 +1167,9 @@ METHOD IdeProjManager:selectCurrentProject()
oDlg:q_btnOk :connect( "clicked()", {|| ::setCurrentProject( oDlg:qObj[ "cbProjects" ]:currentText() ), ;
oDlg:done( 1 ) } )
oDlg:exec()
oDlg:q_btnCancel:disconnect( "clicked()" )
oDlg:q_btnOk :disconnect( "clicked()" )
oDlg:destroy()
oDlg := NIL

View File

@@ -161,6 +161,7 @@ CLASS IdeINI INHERIT IdeObject
METHOD new( oIde )
METHOD create( oIde )
METHOD destroy()
METHOD load( cHbideIni )
METHOD save( cHbideIni )
@@ -185,6 +186,31 @@ METHOD IdeINI:new( oIde )
/*----------------------------------------------------------------------*/
METHOD IdeINI:destroy()
::aINI := NIL
::aAppThemes := NIL
::aProjFiles := NIL
::aFiles := NIL
::aFind := NIL
::aReplace := NIL
::aRecentProjects := NIL
::aRecentFiles := NIL
::aFolders := NIL
::aViews := NIL
::aTaggedProjects := NIL
::aTools := NIL
::aUserToolbars := NIL
::aKeywords := NIL
::aDbuPanelNames := NIL
::aDbuPanelsInfo := NIL
::aDictionaries := NIL
RETURN NIL
/*----------------------------------------------------------------------*/
METHOD IdeINI:create( oIde )
DEFAULT oIde TO ::oIde
::oIde := oIde

View File

@@ -284,6 +284,10 @@ METHOD IdeShortcuts:destroy()
::oUI:destroy()
ENDIF
::aMethods := NIL
::aKeys := NIL
::aDftSCuts := NIL
RETURN Self
/*----------------------------------------------------------------------*/

View File

@@ -75,6 +75,7 @@ CLASS IdeSourcesManager INHERIT IdeObject
METHOD new( oIde )
METHOD create( oIde )
METHOD destroy()
METHOD loadSources()
METHOD saveSource( nTab, lCancel, lAs )
METHOD saveNamedSource( cSource )
@@ -100,6 +101,12 @@ METHOD IdeSourcesManager:new( oIde )
/*----------------------------------------------------------------------*/
METHOD IdeSourcesManager:destroy()
RETURN NIL
/*----------------------------------------------------------------------*/
METHOD IdeSourcesManager:create( oIde )
DEFAULT oIde TO ::oIde

View File

@@ -149,6 +149,47 @@ METHOD IdeThemes:new( oIde, cThemesFile )
/*----------------------------------------------------------------------*/
METHOD IdeThemes:destroy()
IF !empty( ::oSL )
::oSL:qObj[ "listOptions" ]:disConnect( "doubleClicked(QModelIndex)" )
::oSL:qObj[ "buttonOk" ]:disConnect( "clicked()" )
::oSL:qObj[ "buttonCancel" ]:disConnect( "clicked()" )
::oSL:destroy()
ENDIF
::aIni := NIL
::aThemes := NIL
::aControls := NIL
::aItems := NIL
::aPatterns := NIL
::aApplyAct := NIL
IF !empty( ::oUI )
::oUI:q_listThemes :disconnect( "currentRowChanged(int)" )
::oUI:q_listItems :disconnect( "currentRowChanged(int)" )
::oUI:q_buttonColor :disconnect( "clicked()" )
::oUI:q_buttonSave :disconnect( "clicked()" )
::oUI:q_buttonSaveAs :disconnect( "clicked()" )
::oUI:q_buttonCopy :disconnect( "clicked()" )
::oUI:q_buttonApply :disconnect( "clicked()" )
::oUI:q_buttonApplyAll:disconnect( "clicked()" )
::oUI:q_buttonDefault :disconnect( "clicked()" )
::oUI:q_checkItalic :disconnect( "stateChanged(int)" )
::oUI:q_checkBold :disconnect( "stateChanged(int)" )
::oUI:q_checkUnderline:disconnect( "stateChanged(int)" )
::oUI:q_buttonClose :disconnect( "clicked()" )
::qHiliter := NIL
::qEdit := NIL
::oUI:destroy()
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeThemes:create( oIde, cThemesFile )
LOCAL s, b_
@@ -209,29 +250,6 @@ METHOD IdeThemes:create( oIde, cThemesFile )
/*----------------------------------------------------------------------*/
METHOD IdeThemes:destroy()
IF !empty( ::oSL )
::oSL:qObj[ "listOptions" ]:disConnect( "doubleClicked(QModelIndex)" )
::oSL:qObj[ "buttonOk" ]:disConnect( "clicked()" )
::oSL:qObj[ "buttonCancel" ]:disConnect( "clicked()" )
::oSL:destroy()
ENDIF
IF !empty( ::oUI )
::qHiliter := NIL
::qEdit := NIL
//::oThemesDock:oWidget:setWidget( QWidget() )
IF !empty( ::oUI )
::oUI:destroy()
ENDIF
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeThemes:execEvent( cEvent, p )
LOCAL oEditor, a_

View File

@@ -157,7 +157,7 @@ METHOD IdeToolsManager:create( oIde )
/*----------------------------------------------------------------------*/
METHOD IdeToolsManager:destroy()
LOCAL qAct
LOCAL qAct, xTmp
IF !empty( ::oUI )
FOR EACH qAct IN ::aAct
@@ -190,6 +190,27 @@ METHOD IdeToolsManager:destroy()
::oUI:destroy()
ENDIF
FOR EACH xTmp IN ::aBtns
xTmp:disconnect( "clicked()" )
xTmp := NIL
NEXT
FOR EACH xTmp IN ::aToolbars
xTmp := NIL
NEXT
::aAct := NIL
::qToolsMenu := NIL
::qToolsButton := NIL
::aPanelsAct := NIL
::qPanelsButton := NIL
::qPanelsMenu := NIL
::oProcess := NIL
::lExecuting := NIL
::aHdr := NIL
::aBtns := NIL
::aToolbars := NIL
::aPlugins := NIL
RETURN Self
/*----------------------------------------------------------------------*/

View File

@@ -257,13 +257,10 @@ HB_FUNC( __HBQT_EVENTS_CONNECT )
hb_snprintf( prop, sizeof( prop ), "P%iP", type ); /* Make it a unique identifier */
int i = object->property( prop ).toInt();
if( i == 0 ) /* No Duplicates of same event with same object - it is a design decision - never alter */
if( i == 0 )
{
t_events->listBlock << codeblock;
object->setProperty( prop, ( int ) t_events->listBlock.size() );
nResult = 0;
}
else
{
@@ -272,9 +269,8 @@ HB_FUNC( __HBQT_EVENTS_CONNECT )
hb_itemRelease( t_events->listBlock.at( i - 1 ) );
}
t_events->listBlock[ i - 1 ] = codeblock;
nResult = 0;
}
nResult = 0;
}
else
nResult = -3;

View File

@@ -123,10 +123,6 @@ HBQSlots::~HBQSlots()
listBlock[ i ] = NULL;
}
}
/* QUESTION: Should there be all remaining active slots disconnected at this point? */
/* Should be disconnected, but this is a responsibility of programmer as object is only known to the application */
//listBlock.clear();
}
int HBQSlots::qt_metacall( QMetaObject::Call c, int id, void ** arguments )

View File

@@ -210,6 +210,8 @@ METHOD HbQtObjectHandler:disconnect( cnEvent )
CASE 0
RETURN .T.
CASE -3 /* event not found */
CASE -2 /* event not found */
CASE -1 /* event not found */
RETURN .F.
ENDSWITCH
EXIT

View File

@@ -419,28 +419,28 @@ METHOD XbpWindow:connectWindowEvents()
METHOD XbpWindow:disconnectWindowEvents()
::oWidget:connect( QEvent_MouseButtonPress , {|e| ::grabEvent( QEvent_MouseButtonPress , e ) } )
::oWidget:connect( QEvent_MouseButtonRelease , {|e| ::grabEvent( QEvent_MouseButtonRelease , e ) } )
::oWidget:connect( QEvent_MouseMove , {|e| ::grabEvent( QEvent_MouseMove , e ) } )
::oWidget:connect( QEvent_MouseButtonDblClick, {|e| ::grabEvent( QEvent_MouseButtonDblClick, e ) } )
::oWidget:connect( QEvent_Enter , {|e| ::grabEvent( QEvent_Enter , e ) } )
::oWidget:connect( QEvent_Leave , {|e| ::grabEvent( QEvent_Leave , e ) } )
::oWidget:connect( QEvent_Wheel , {|e| ::grabEvent( QEvent_Wheel , e ) } )
::oWidget:disconnect( QEvent_MouseButtonPress )
::oWidget:disconnect( QEvent_MouseButtonRelease )
::oWidget:disconnect( QEvent_MouseMove )
::oWidget:disconnect( QEvent_MouseButtonDblClick )
::oWidget:disconnect( QEvent_Enter )
::oWidget:disconnect( QEvent_Leave )
::oWidget:disconnect( QEvent_Wheel )
::oWidget:connect( QEvent_FocusIn , {|e| ::grabEvent( QEvent_FocusIn , e ) } )
::oWidget:connect( QEvent_FocusOut , {|e| ::grabEvent( QEvent_FocusOut , e ) } )
::oWidget:connect( QEvent_DragEnter , {|e| ::grabEvent( QEvent_DragEnter , e ) } )
::oWidget:connect( QEvent_DragLeave , {|e| ::grabEvent( QEvent_DragLeave , e ) } )
::oWidget:connect( QEvent_DragMove , {|e| ::grabEvent( QEvent_DragMove , e ) } )
::oWidget:connect( QEvent_Drop , {|e| ::grabEvent( QEvent_Drop , e ) } )
::oWidget:connect( QEvent_WhatsThis , {|e| ::grabEvent( QEvent_WhatsThis , e ) } )
::oWidget:connect( QEvent_KeyPress , {|e| ::grabEvent( QEvent_KeyPress , e ) } )
::oWidget:disconnect( QEvent_FocusIn )
::oWidget:disconnect( QEvent_FocusOut )
::oWidget:disconnect( QEvent_DragEnter )
::oWidget:disconnect( QEvent_DragLeave )
::oWidget:disconnect( QEvent_DragMove )
::oWidget:disconnect( QEvent_Drop )
::oWidget:disconnect( QEvent_WhatsThis )
::oWidget:disconnect( QEvent_KeyPress )
::oWidget:connect( QEvent_ContextMenu , {|e| ::grabEvent( QEvent_ContextMenu , e ) } )
::oWidget:disconnect( QEvent_ContextMenu )
::oWidget:connect( QEvent_Move , {|e| ::grabEvent( QEvent_Move , e ) } )
* ::oWidget:connect( QEvent_Paint , {|e| ::grabEvent( QEvent_Paint , e ) } )
* ::oWidget:connect( QEvent_Resize , {|e| ::grabEvent( QEvent_Resize , e ) } )
::oWidget:disconnect( QEvent_Move )
* ::oWidget:disconnect( QEvent_Paint )
* ::oWidget:disconnect( QEvent_Resize )
RETURN Self