2012-01-26 12:37 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbide/idebrowse.prg
  * contrib/hbide/idechangelog.prg
  * contrib/hbide/idedocks.prg
  * contrib/hbide/idedocwriter.prg
  * contrib/hbide/ideedit.prg
  * contrib/hbide/ideeditor.prg
  * contrib/hbide/idefindreplace.prg
  * contrib/hbide/ideformat.prg
  * contrib/hbide/idefunctions.prg
  * contrib/hbide/ideharbourhelp.prg
  * contrib/hbide/idehome.prg
  * contrib/hbide/idemain.prg
  * contrib/hbide/ideobject.prg
  * contrib/hbide/idesaveload.prg
  * contrib/hbide/ideshortcuts.prg
  * contrib/hbide/ideskeletons.prg
  * contrib/hbide/idethemes.prg
  * contrib/hbide/idetools.prg
    * Fixed: (Hopefully) hbIDE crash at exit.
       This might happen at certain situations when a slot 
       is executed while object has already been destroyed 
       by its parent. 
       The problem report was furnished by Antonio Linares, thanks.
This commit is contained in:
Pritpal Bedi
2012-01-26 20:44:50 +00:00
parent 8fbd0c8bcd
commit 3b4cc84f91
19 changed files with 102 additions and 33 deletions

View File

@@ -16,6 +16,31 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-01-26 12:37 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/idebrowse.prg
* contrib/hbide/idechangelog.prg
* contrib/hbide/idedocks.prg
* contrib/hbide/idedocwriter.prg
* contrib/hbide/ideedit.prg
* contrib/hbide/ideeditor.prg
* contrib/hbide/idefindreplace.prg
* contrib/hbide/ideformat.prg
* contrib/hbide/idefunctions.prg
* contrib/hbide/ideharbourhelp.prg
* contrib/hbide/idehome.prg
* contrib/hbide/idemain.prg
* contrib/hbide/ideobject.prg
* contrib/hbide/idesaveload.prg
* contrib/hbide/ideshortcuts.prg
* contrib/hbide/ideskeletons.prg
* contrib/hbide/idethemes.prg
* contrib/hbide/idetools.prg
* Fixed: (Hopefully) hbIDE crash at exit.
This might happen at certain situations when a slot
is executed while object has already been destroyed
by its parent.
The problem report was furnished by Antonio Linares, thanks.
2012-01-26 10:14 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/hbqt/hbqt_common.hbc
! untested patch to switch static supc++ to dynamic stdc++

View File

@@ -567,6 +567,10 @@ METHOD IdeBrowseManager:execEvent( cEvent, p, p1 )
HB_SYMBOL_UNUSED( p )
HB_SYMBOL_UNUSED( p1 )
IF ::lQuitting
RETURN Self
ENDIF
SWITCH cEvent
CASE "dockDbu_dragEnterEvent"
p:acceptProposedAction()

View File

@@ -231,6 +231,10 @@ METHOD IdeChangeLog:execEvent( cEvent, p )
HB_SYMBOL_UNUSED( p )
IF ::lQuitting
RETURN Self
ENDIF
SWITCH cEvent
CASE "buttonTitle_clicked"

View File

@@ -560,6 +560,10 @@ METHOD IdeDocks:buildSystemTray()
METHOD IdeDocks:execEvent( cEvent, p, p1 )
LOCAL qEvent, qMime, qList, qUrl, i, n, oEdit, aMenu
IF ::lQuitting
RETURN Self
ENDIF
SWITCH cEvent
CASE "dockCuiEd_visibilityChanged"
IF p; ::oCUI:show(); ENDIF

View File

@@ -303,6 +303,10 @@ METHOD IdeDocWriter:setParameters()
METHOD IdeDocWriter:execEvent( nMode, p )
IF ::lQuitting
RETURN Self
ENDIF
SWITCH nMode
CASE buttonArgs_clicked
IF p

View File

@@ -442,6 +442,10 @@ METHOD IdeEdit:execEvent( nMode, oEdit, p, p1 )
HB_SYMBOL_UNUSED( p1 )
IF ::lQuitting
RETURN Self
ENDIF
qEdit := oEdit:qEdit
qCursor := qEdit:textCursor()
oEdit:nCurLineNo := qCursor:blockNumber()

View File

@@ -421,6 +421,10 @@ METHOD IdeEditsManager:addSourceInTree( cSourceFile, cView )
METHOD IdeEditsManager:execEvent( cEvent, p )
LOCAL oEdit
IF ::lQuitting
RETURN Self
ENDIF
DO CASE
CASE cEvent == "qFldsCompleter_activated"
IF !empty( oEdit := ::getEditObjectCurrent() )
@@ -1683,6 +1687,10 @@ METHOD IdeEditor:execEvent( cEvent, p )
p := p
IF ::lQuitting
RETURN Self
ENDIF
SWITCH cEvent
CASE "qTimeSave_timeout"

View File

@@ -166,6 +166,9 @@ METHOD IdeUpDown:execEvent( cEvent, p )
LOCAL cText, oEdit
HB_SYMBOL_UNUSED( p )
IF ::lQuitting
RETURN Self
ENDIF
IF !empty( oEdit := ::oEM:getEditObjectCurrent() )
cText := oEdit:getSelectedText()
@@ -878,6 +881,10 @@ METHOD IdeFindInFiles:buildUI()
METHOD IdeFindInFiles:execEvent( cEvent, p )
LOCAL cPath, qLineEdit, qCursor, cSource, v, nInfo
IF ::lQuitting
RETURN Self
ENDIF
SWITCH cEvent
CASE "buttonClose"
@@ -968,10 +975,7 @@ METHOD IdeFindInFiles:execEvent( cEvent, p )
METHOD IdeFindInFiles:replaceAll()
LOCAL nL, nB, qCursor, aFind
LOCAL cSource := ""
#if 0
LOCAL isOpen := .f.
LOCAL isModified := .f.
#endif
IF empty( ::cReplWith := ::oUI:q_comboRepl:currentText() )
RETURN Self
ENDIF
@@ -984,24 +988,6 @@ METHOD IdeFindInFiles:replaceAll()
FOR EACH aFind IN ::aInfo
IF aFind[ 1 ] == -2
IF ! ( cSource == aFind[ 2 ] )
#if 0
IF ! empty( cSource )
IF ! isOpen
::oSM:closeSource( , .f., .f., .f. )
ELSE
IF ! isModified
::oSM:saveSource()
ENDIF
ENDIF
ENDIF
cSource := aFind[ 2 ]
IF ( isOpen := ::oEM:isOpen( cSource ) )
::oEM:setSourceVisible( cSource )
isModified := ::oEM:getEditorCurrent():qDocument:isModified()
ELSE
::oSM:editSource( cSource, 0, 0, 0, NIL, NIL, .f., .t. )
ENDIF
#endif
cSource := aFind[ 2 ]
::oSM:editSource( cSource, 0, 0, 0, NIL, "Main", .f., .t. )
ENDIF
@@ -1024,17 +1010,7 @@ METHOD IdeFindInFiles:replaceAll()
qCursor:endEditBlock()
ENDIF
NEXT
#if 0
IF ! empty( cSource )
IF ! isOpen
::oSM:closeSource( , .f., .f., .f. )
ELSE
IF ! isModified
::oSM:saveSource()
ENDIF
ENDIF
ENDIF
#endif
RETURN Self
/*----------------------------------------------------------------------*/

View File

@@ -163,6 +163,10 @@ METHOD IdeFormat:execEvent( cEvent, p )
HB_SYMBOL_UNUSED( p )
IF ::lQuitting
RETURN Self
ENDIF
SWITCH cEvent
CASE "checkSelOnly_changed"

View File

@@ -151,6 +151,10 @@ METHOD IdeFunctions:create( oIde )
METHOD IdeFunctions:execEvent( nMode, p )
LOCAL n, nLen
IF ::lQuitting
RETURN Self
ENDIF
DO CASE
CASE nMode == "editFunc_textChanged"
p := upper( p )

View File

@@ -497,6 +497,10 @@ METHOD IdeHarbourHelp:execEvent( nMode, p, p1 )
HB_SYMBOL_UNUSED( p1 )
IF ::lQuitting
RETURN Self
ENDIF
SWITCH nMode
CASE "buttonInstall_clicked"

View File

@@ -220,6 +220,10 @@ METHOD IdeHome:destroy()
METHOD IdeHome:execEvent( nMode, p )
LOCAL cAct, cText, cExt
IF ::lQuitting
RETURN Self
ENDIF
DO CASE
CASE nMode == "tabWidget_currentChanged"
IF p == 0

View File

@@ -333,6 +333,7 @@ CLASS HbIde
DATA oSysMenu
DATA lSortedFuncList INIT .t.
DATA lQuitting INIT .f.
METHOD new( aParams )
METHOD create( aParams )
@@ -756,12 +757,14 @@ METHOD HbIde:create( aParams )
nEvent := AppEvent( @mp1, @mp2, @oXbp )
IF nEvent == xbeP_Quit
::lQuitting := .t.
::oINI:save()
EXIT
ENDIF
IF nEvent == xbeP_Close .AND. oXbp == ::oDlg
IF hbide_setClose()
::lQuitting := .t.
::oINI:save()
::oSM:closeAllSources( .f. /* can not cancel */ )
EXIT

View File

@@ -216,6 +216,7 @@ CLASS IdeObject
ACCESS lCurrentLineHighlightEnabled INLINE ::oIde:lCurrentLineHighlightEnabled
ACCESS aMarkTBtns INLINE ::oIde:aMarkTBtns
ACCESS lQuitting INLINE ::oIde:lQuitting
DATA aSlots INIT {}
DATA aEvents INIT {}

View File

@@ -1566,6 +1566,10 @@ METHOD IdeSetup:execEvent( cEvent, p, p1 )
HB_SYMBOL_UNUSED( p1 )
IF ::lQuitting
RETURN Self
ENDIF
SWITCH cEvent
CASE "buttonSelFont_clicked"

View File

@@ -310,6 +310,10 @@ METHOD IdeShortcuts:show()
METHOD IdeShortcuts:execEvent( nMode, p )
LOCAL nRow, cMethod, cFile, cPath, cTemp, cExt, a_
IF ::lQuitting
RETURN Self
ENDIF
SWITCH nMode
CASE 21000

View File

@@ -173,6 +173,10 @@ METHOD IdeSkeletons:execEvent( cEvent, p )
HB_SYMBOL_UNUSED( p )
IF ::lQuitting
RETURN Self
ENDIF
SWITCH cEvent
CASE "buttonNew_clicked"

View File

@@ -257,6 +257,10 @@ METHOD IdeThemes:execEvent( cEvent, p )
HB_SYMBOL_UNUSED( p )
IF ::lQuitting
RETURN Self
ENDIF
SWITCH cEvent
CASE "listItems_currentRowChanged"
::nCurItem := p+1

View File

@@ -322,6 +322,10 @@ METHOD IdeToolsManager:execEvent( cMode, p )
HB_SYMBOL_UNUSED( p )
IF ::lQuitting
RETURN Self
ENDIF
SWITCH cMode
CASE "checkToolActive_stateChanged"
nRow := ::oUI:q_listToolbars:currentRow()