From 72e2cdf475d8b6c5e479843f681cbed0b2ef06d7 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Mon, 28 Mar 2011 08:27:24 +0000 Subject: [PATCH] 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. --- harbour/ChangeLog | 34 +++++ harbour/contrib/hbide/hbqreportsmanager.prg | 46 ++++++ harbour/contrib/hbide/hbqtoolbar.prg | 13 +- harbour/contrib/hbide/idebrowse.prg | 94 ++++++++++++- harbour/contrib/hbide/idedict.prg | 9 ++ harbour/contrib/hbide/idedocks.prg | 25 +++- harbour/contrib/hbide/ideeditor.prg | 73 +++++----- harbour/contrib/hbide/ideenviron.prg | 5 + harbour/contrib/hbide/ideformat.prg | 9 ++ harbour/contrib/hbide/idefunctions.prg | 3 +- harbour/contrib/hbide/ideharbourhelp.prg | 65 +++++++-- harbour/contrib/hbide/idehome.prg | 2 + harbour/contrib/hbide/idemain.prg | 131 +++++++++++++++++- harbour/contrib/hbide/idemisc.prg | 2 +- harbour/contrib/hbide/ideplugins.prg | 10 ++ harbour/contrib/hbide/ideprojmanager.prg | 21 +++ harbour/contrib/hbide/idesaveload.prg | 26 ++++ harbour/contrib/hbide/ideshortcuts.prg | 4 + harbour/contrib/hbide/idesources.prg | 7 + harbour/contrib/hbide/idethemes.prg | 64 ++++++--- harbour/contrib/hbide/idetools.prg | 23 ++- .../contrib/hbqt/qtcore/hbqt_hbqevents.cpp | 8 +- harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp | 4 - harbour/contrib/hbqt/qtcore/hbqt_misc.prg | 2 + harbour/contrib/hbxbp/xbpwindow.prg | 38 ++--- 25 files changed, 607 insertions(+), 111 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3d7115f435..5f1da2f9c2 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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 diff --git a/harbour/contrib/hbide/hbqreportsmanager.prg b/harbour/contrib/hbide/hbqreportsmanager.prg index 9da1583014..7b8cae3a14 100644 --- a/harbour/contrib/hbide/hbqreportsmanager.prg +++ b/harbour/contrib/hbide/hbqreportsmanager.prg @@ -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 /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/hbqtoolbar.prg b/harbour/contrib/hbide/hbqtoolbar.prg index a5ecf3213b..7bf23e4a52 100644 --- a/harbour/contrib/hbide/hbqtoolbar.prg +++ b/harbour/contrib/hbide/hbqtoolbar.prg @@ -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 diff --git a/harbour/contrib/hbide/idebrowse.prg b/harbour/contrib/hbide/idebrowse.prg index 20a1a13403..045ddd54a0 100644 --- a/harbour/contrib/hbide/idebrowse.prg +++ b/harbour/contrib/hbide/idebrowse.prg @@ -57,7 +57,7 @@ * * Harbour-Qt IDE * - * Pritpal Bedi + * Pritpal Bedi * 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 /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/idedict.prg b/harbour/contrib/hbide/idedict.prg index 1965eadff9..7e4cc2b4e0 100644 --- a/harbour/contrib/hbide/idedict.prg +++ b/harbour/contrib/hbide/idedict.prg @@ -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 /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/idedocks.prg b/harbour/contrib/hbide/idedocks.prg index 8656c448e0..8e08f784e6 100644 --- a/harbour/contrib/hbide/idedocks.prg +++ b/harbour/contrib/hbide/idedocks.prg @@ -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 diff --git a/harbour/contrib/hbide/ideeditor.prg b/harbour/contrib/hbide/ideeditor.prg index b0dac7ac7b..272a65bdd0 100644 --- a/harbour/contrib/hbide/ideeditor.prg +++ b/harbour/contrib/hbide/ideeditor.prg @@ -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 /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/ideenviron.prg b/harbour/contrib/hbide/ideenviron.prg index 3bc169f5aa..18d313d631 100644 --- a/harbour/contrib/hbide/ideenviron.prg +++ b/harbour/contrib/hbide/ideenviron.prg @@ -126,6 +126,11 @@ METHOD IdeEnvironments:destroy() ::oUI_1:destroy() ENDIF + ::aNames := NIL + ::aEnvrns := NIL + ::aShellContents := NIL + ::aCommons := NIL + RETURN Self /*------------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/ideformat.prg b/harbour/contrib/hbide/ideformat.prg index d29f57a536..1c5d464f12 100644 --- a/harbour/contrib/hbide/ideformat.prg +++ b/harbour/contrib/hbide/ideformat.prg @@ -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 diff --git a/harbour/contrib/hbide/idefunctions.prg b/harbour/contrib/hbide/idefunctions.prg index bece5b529d..45a5cbfe7b 100644 --- a/harbour/contrib/hbide/idefunctions.prg +++ b/harbour/contrib/hbide/idefunctions.prg @@ -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++ diff --git a/harbour/contrib/hbide/ideharbourhelp.prg b/harbour/contrib/hbide/ideharbourhelp.prg index b26de7ee30..8822488c86 100644 --- a/harbour/contrib/hbide/ideharbourhelp.prg +++ b/harbour/contrib/hbide/ideharbourhelp.prg @@ -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() diff --git a/harbour/contrib/hbide/idehome.prg b/harbour/contrib/hbide/idehome.prg index 159d699e67..6a2396f801 100644 --- a/harbour/contrib/hbide/idehome.prg +++ b/harbour/contrib/hbide/idehome.prg @@ -164,7 +164,9 @@ METHOD IdeHome:destroy() ::qWelcomeBrowser:disconnect( "customContextMenuRequested(QPoint)" ) ::qFaqBrowser:disconnect( "customContextMenuRequested(QPoint)" ) + ::oWelcomeTab := NIL ::qWelcomeBrowser := NIL + ::qCurBrowser := NIL RETURN Self diff --git a/harbour/contrib/hbide/idemain.prg b/harbour/contrib/hbide/idemain.prg index 368bbc9272..280b7a6429 100644 --- a/harbour/contrib/hbide/idemain.prg +++ b/harbour/contrib/hbide/idemain.prg @@ -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 diff --git a/harbour/contrib/hbide/idemisc.prg b/harbour/contrib/hbide/idemisc.prg index d21fc15916..1467fa7f51 100644 --- a/harbour/contrib/hbide/idemisc.prg +++ b/harbour/contrib/hbide/idemisc.prg @@ -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 diff --git a/harbour/contrib/hbide/ideplugins.prg b/harbour/contrib/hbide/ideplugins.prg index c61a7ae9a2..1f09a66dd4 100644 --- a/harbour/contrib/hbide/ideplugins.prg +++ b/harbour/contrib/hbide/ideplugins.prg @@ -316,3 +316,13 @@ FUNCTION hbide_execScriptFunction( cFunc, ... ) RETURN NIL /*----------------------------------------------------------------------*/ + +FUNCTION hbide_destroyPlugins() + + s_aPlugins := NIL + s_aLoaded := NIL + s_aPersist := NIL + + RETURN NIL + +/*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/ideprojmanager.prg b/harbour/contrib/hbide/ideprojmanager.prg index 1b32d4656e..5c8b1195ef 100644 --- a/harbour/contrib/hbide/ideprojmanager.prg +++ b/harbour/contrib/hbide/ideprojmanager.prg @@ -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 diff --git a/harbour/contrib/hbide/idesaveload.prg b/harbour/contrib/hbide/idesaveload.prg index 15791ee418..235d5d2efa 100644 --- a/harbour/contrib/hbide/idesaveload.prg +++ b/harbour/contrib/hbide/idesaveload.prg @@ -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 diff --git a/harbour/contrib/hbide/ideshortcuts.prg b/harbour/contrib/hbide/ideshortcuts.prg index 33eff1945d..d91e93258d 100644 --- a/harbour/contrib/hbide/ideshortcuts.prg +++ b/harbour/contrib/hbide/ideshortcuts.prg @@ -284,6 +284,10 @@ METHOD IdeShortcuts:destroy() ::oUI:destroy() ENDIF + ::aMethods := NIL + ::aKeys := NIL + ::aDftSCuts := NIL + RETURN Self /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/idesources.prg b/harbour/contrib/hbide/idesources.prg index c0715bfcc4..75250181a4 100644 --- a/harbour/contrib/hbide/idesources.prg +++ b/harbour/contrib/hbide/idesources.prg @@ -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 diff --git a/harbour/contrib/hbide/idethemes.prg b/harbour/contrib/hbide/idethemes.prg index 623c7aeca5..13a43bb2ca 100644 --- a/harbour/contrib/hbide/idethemes.prg +++ b/harbour/contrib/hbide/idethemes.prg @@ -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_ diff --git a/harbour/contrib/hbide/idetools.prg b/harbour/contrib/hbide/idetools.prg index bb63222aeb..cc29f0c582 100644 --- a/harbour/contrib/hbide/idetools.prg +++ b/harbour/contrib/hbide/idetools.prg @@ -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 /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp b/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp index f45a5a1a9a..be3203a581 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp +++ b/harbour/contrib/hbqt/qtcore/hbqt_hbqevents.cpp @@ -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; diff --git a/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp b/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp index ba1f6443dc..0df6ec7c66 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp +++ b/harbour/contrib/hbqt/qtcore/hbqt_hbqslots.cpp @@ -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 ) diff --git a/harbour/contrib/hbqt/qtcore/hbqt_misc.prg b/harbour/contrib/hbqt/qtcore/hbqt_misc.prg index f435e6d9ee..d4a0522af8 100644 --- a/harbour/contrib/hbqt/qtcore/hbqt_misc.prg +++ b/harbour/contrib/hbqt/qtcore/hbqt_misc.prg @@ -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 diff --git a/harbour/contrib/hbxbp/xbpwindow.prg b/harbour/contrib/hbxbp/xbpwindow.prg index 02cd72a780..f53ec49aa4 100644 --- a/harbour/contrib/hbxbp/xbpwindow.prg +++ b/harbour/contrib/hbxbp/xbpwindow.prg @@ -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