diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 33c5e9c49f..2c6a86ecf0 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,12 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-01-16 23:14 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbide/hbide.prg + * contrib/hbide/ideeditor.prg + * contrib/hbide/idemisc.prg + ! Updated to respect latest changes. + 2010-01-16 22:29 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/generator/hbqtgen.prg * contrib/hbqt/generator/qt45.qtp diff --git a/harbour/contrib/hbide/hbide.prg b/harbour/contrib/hbide/hbide.prg index 12529ba6a5..c5198d5658 100644 --- a/harbour/contrib/hbide/hbide.prg +++ b/harbour/contrib/hbide/hbide.prg @@ -94,10 +94,6 @@ PROCEDURE Main( cProjIni ) SET CENTURY ON SET EPOCH TO 1970 - //HBQT_SET_RELEASE_METHOD( HBQT_RELEASE_WITH_DESTRUTOR ) // Exits cleanly - HBQT_SET_RELEASE_METHOD( HBQT_RELEASE_WITH_DELETE ) // Exits cleanly - //HBQT_SET_RELEASE_METHOD( HBQT_RELEASE_WITH_DELETE_LATER ) // Exits cleanly - s_resPath := hb_DirBase() + "resources" + hb_OsPathSeparator() s_pathSep := hb_OsPathSeparator() diff --git a/harbour/contrib/hbide/ideeditor.prg b/harbour/contrib/hbide/ideeditor.prg index ef4dd71cca..7da261e1d4 100644 --- a/harbour/contrib/hbide/ideeditor.prg +++ b/harbour/contrib/hbide/ideeditor.prg @@ -793,8 +793,8 @@ METHOD IdeEditor:create( oIde, cSourceFile, nPos, nHPos, nVPos, cTheme ) // ::oTab:oWidget:setLayout( ::qLayout ) - ::oEdit := IdeEdit():new( Self, 0 ):create() - ::qEdit := ::oEdit:qEdit + ::oEdit := IdeEdit():new( Self, 0 ):create() + ::qEdit := ::oEdit:qEdit ::qCqEdit := ::oEdit:qEdit ::qCoEdit := ::oEdit @@ -869,6 +869,8 @@ METHOD IdeEditor:split( nOrient, oEditP ) METHOD IdeEditor:destroy() LOCAL n, oEdit + ::disconnect( ::qDocument, "blockCountChanged(int)" ) + ::disconnect( ::qDocument, "contentsChange(int,int,int)" ) ::qCqEdit := NIL ::qEdit := NIL @@ -883,15 +885,19 @@ METHOD IdeEditor:destroy() ::qDocument:pPtr := 0 ::qDocument := nil ENDIF - IF !Empty( ::qLayout ) - ::qLayout:pPtr := 0 - ::qLayout := nil - ENDIF + IF !Empty( ::qHiliter ) ::qHiliter:pPtr := 0 ::qHiliter := nil ENDIF + ::oEdit := NIL + + IF !Empty( ::qLayout ) + ::qLayout:pPtr := 0 + ::qLayout := nil + ENDIF + IF ( n := ascan( ::aTabs, {|e_| e_[ TAB_OEDITOR ] == Self } ) ) > 0 hb_adel( ::oIde:aTabs, n, .T. ) ENDIF @@ -918,7 +924,6 @@ METHOD IdeEditor:setDocumentProperties() qCursor := QTextCursor():configure( ::qEdit:textCursor() ) IF !( ::lLoaded ) /* First Time */ - hbide_dbg( "......................" ) ::qEdit:setPlainText( hb_memoRead( ::sourceFile ) ) qCursor:setPosition( ::nPos ) ::qEdit:setTextCursor( qCursor ) @@ -1133,10 +1138,12 @@ METHOD IdeEdit:create( oEditor, nMode ) ::qHLayout:addWidget( ::qLineNos ) ::qHLayout:addWidget( ::qEdit ) + #if 0 ::qActionTab := QAction():new( ::qEdit ) ::qActionTab:setText( "Editor Tab" ) ::qActionTab:setShortcut( QKeySequence():new( "Ctrl+F2" ) ) ::connect( ::qActionTab, "triggered(bool)", {|| ::exeEvent( 71, Self ) } ) + #endif ::connectEditSlots( Self ) @@ -1151,15 +1158,15 @@ METHOD IdeEdit:destroy() ::qHLayout:removeWidget( ::qEdit ) ::qHLayout:removeWidget( ::qLineNos ) - ::qHLayout:pPtr := 0 - ::qHLayout := NIL - - ::qLineNos:pPtr := 0 + //::qLineNos:pPtr := 0 ::qLineNos := NIL - ::qEdit:pPtr := 0 + //::qEdit:pPtr := 0 ::qEdit := NIL + ::qHLayout:pPtr := 0 + ::qHLayout := NIL + RETURN Self /*----------------------------------------------------------------------*/ @@ -1326,19 +1333,24 @@ METHOD IdeEdit:highlightCurrentLine( oEdit ) /*----------------------------------------------------------------------*/ METHOD IdeEdit:setNewMark() - LOCAL qBlockFmt, qTextBlock, qDoc, lModified + LOCAL qBlockFmt, qTextBlock, qDoc, lModified, qUData IF empty( ::qCursorMark ) qDoc := QTextDocument():configure( ::qEdit:document() ) lModified := qDoc:isModified() ::qCursorMark := QTextCursor():configure( ::qEdit:textCursor() ) + qTextBlock := QTextBlock():configure( ::qCursorMark:block() ) qBlockFmt := QTextBlockFormat():new() qBlockFmt:setBackground( ::qBrushMark ) ::qCursorMark:setBlockFormat( qBlockFmt ) qTextBlock:setUserState( 77 ) + qUData := HBQTextBlockUserData():new() + qUData:setData( 99 ) + qTextBlock:setUserData( qUData ) + qDoc:setModified( lModified ) ELSE ::qCursorMark:setBlockFormat( QTextBlockFormat():new() ) @@ -1359,3 +1371,4 @@ METHOD IdeEdit:gotoLastMark() RETURN Self /*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbide/idemisc.prg b/harbour/contrib/hbide/idemisc.prg index e77d09878a..94dd68c72e 100644 --- a/harbour/contrib/hbide/idemisc.prg +++ b/harbour/contrib/hbide/idemisc.prg @@ -164,9 +164,6 @@ FUNCTION hbide_createTarget( cFile, txt_ ) /*----------------------------------------------------------------------*/ FUNCTION hbide_posAndSize( qWidget ) - LOCAL qRect := QRect():configure( qWidget:geometry() ) - - hbide_dbg( qRect:x(), qRect:y(), qRect:width(), qRect:height() ) RETURN hb_ntos( qWidget:x() ) + "," + hb_ntos( qWidget:y() ) + "," + ; hb_ntos( qWidget:width() ) + "," + hb_ntos( qWidget:height() ) + ","