From 8755fb80e35840f9abe58f5d9dca1dbea089e1c9 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 4 Jan 2010 14:58:36 +0000 Subject: [PATCH] 2010-01-04 15:56 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbide/idethemes.prg * contrib/hbide/ideeditor.prg * contrib/hbide/hbide.prg * contrib/hbide/ideactions.prg * contrib/hbide/ideprojmanager.prg ! Reapplied my File() -> hb_FileExists() pacth. Please note that it's not my favourite pass-time to find out which of my changes were overwritten and such practice pretty much defeats the purpose of version tracking systems like SVN altogther. It's committers job to properly resolve conflicts, unless there is as advance request for commit-stop. Since it's also not very efficient for me to refix all future File() usages to hb_FileExists(), it would be much more beneficiary for the whole project if coding practices like that would be adopted by other developers and taken care of in future updates. Thanks in advance. --- harbour/ChangeLog | 25 +++++++++++++++++++++--- harbour/contrib/hbide/hbide.prg | 6 +++--- harbour/contrib/hbide/ideactions.prg | 6 +++--- harbour/contrib/hbide/ideeditor.prg | 5 ++--- harbour/contrib/hbide/ideprojmanager.prg | 7 +++---- harbour/contrib/hbide/idethemes.prg | 6 +++--- 6 files changed, 36 insertions(+), 19 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 02ecc928ae..2b943762cd 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,26 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-01-04 15:56 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbide/idethemes.prg + * contrib/hbide/ideeditor.prg + * contrib/hbide/hbide.prg + * contrib/hbide/ideactions.prg + * contrib/hbide/ideprojmanager.prg + ! Reapplied my File() -> hb_FileExists() pacth. + + Please note that it's not my favourite pass-time to + find out which of my changes were overwritten and such + practice pretty much defeats the purpose of version + tracking systems like SVN altogther. It's committers + job to properly resolve conflicts, unless there is + as advance request for commit-stop. + Since it's also not very efficient for me to refix all + future File() usages to hb_FileExists(), it would + be much more beneficiary for the whole project if coding + practices like that would be adopted by other developers + and taken care of in future updates. Thanks in advance. + 2010-01-04 13:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/gtxwc/gtxwc.c ! cleaned a little bit hack with euro sign support @@ -53,8 +73,8 @@ * contrib/hbide/resources/tabreadonly.png * contrib/hbxbp/xbpqtuiloader.prg - - A lot of changes are in effect including the patch + + A lot of changes are in effect including the patch sent by Vailton. The code is in the middle of restructing phase and may take several days to finish. Till the I request you all to bear with me and may expect some bumps too. @@ -81,7 +101,6 @@ This greatly simmplifies coding and allows to exploit child widgets as real-time objects. - 2010-01-03 21:19 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/hbqt_hbevents.cpp * contrib/hbqt/hbqt_hbslots.cpp diff --git a/harbour/contrib/hbide/hbide.prg b/harbour/contrib/hbide/hbide.prg index 2b515e29e2..f17b616acb 100644 --- a/harbour/contrib/hbide/hbide.prg +++ b/harbour/contrib/hbide/hbide.prg @@ -661,7 +661,7 @@ METHOD HbIde:insertText( cKey ) n := ::selectSource( "open" ) - IF Empty(n) .OR. !File( n ) + IF Empty(n) .OR. !hb_FileExists( n ) RETURN Self ENDIF @@ -753,7 +753,7 @@ METHOD HbIde:editSource( cSourceFile, nPos, nHPos, nVPos, cTheme ) RETURN Self ENDIF - IF !Empty( cSourceFile ) .AND. !File( cSourceFile ) + IF !Empty( cSourceFile ) .AND. !hb_FileExists( cSourceFile ) MsgBox( 'File not found: ' + cSourceFile ) RETURN Self ENDIF @@ -1589,7 +1589,7 @@ METHOD HbIde:loadUI( cUi ) LOCAL cUiFull := s_resPath + cUi + ".ui" LOCAL qDialog, qUiLoader, qFile - IF file( cUiFull ) + IF hb_FileExists( cUiFull ) qFile := QFile():new( cUiFull ) IF qFile:open( 1 ) qUiLoader := QUiLoader():new() diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg index 4e6ee25756..cab827b83b 100644 --- a/harbour/contrib/hbide/ideactions.prg +++ b/harbour/contrib/hbide/ideactions.prg @@ -239,7 +239,7 @@ FUNCTION buildMainMenu( oWnd, oIde ) f := hbide_pathNormalized( oIde:aIni[ INI_RECENTFILES, n ], .F. ) lEmpty := .F. oSubMenu2:addItem( { _T( '~' + hb_NumToHex(n) + '. ' + f ) , nil } ) - IF !File(f) + IF !hb_FileExists(f) oSubMenu2:disableItem( n ) ENDIF NEXT @@ -258,7 +258,7 @@ FUNCTION buildMainMenu( oWnd, oIde ) f := hbide_pathNormalized( oIde:aIni[ INI_RECENTPROJECTS, n ], .F. ) lEmpty := .F. oSubMenu2:addItem( { _T( '~' + hb_NumToHex(n) + '. ' + f ) , nil } ) - IF !File(f) + IF !hb_FileExists(f) oSubMenu2:disableItem( n ) ENDIF NEXT @@ -507,7 +507,7 @@ STATIC FUNCTION hbide_mnuUpdateMRUpopup( oIde, nType ) oItem[4]:addItem( { _T( '~' + hb_NumToHex(n) + '. ' + c ) , nil } ) - IF !File(c) + IF !hb_FileExists(c) oItem[4]:disableItem( n ) ENDIF NEXT diff --git a/harbour/contrib/hbide/ideeditor.prg b/harbour/contrib/hbide/ideeditor.prg index a2fddafb9d..9349b6957e 100644 --- a/harbour/contrib/hbide/ideeditor.prg +++ b/harbour/contrib/hbide/ideeditor.prg @@ -436,7 +436,7 @@ METHOD IdeEditor:showPPO( cFile ) qHiliter := ::oIde:oThemes:SetSyntaxHilighting( qEdit ) - Qt_Connect_Event( qEdit, QEvent_Close, {|| ::closePPO( qEdit, qHiliter, cFile, .t. ) } ) + Qt_Events_Connect( ::pEvents, qEdit, QEvent_Close, {|| ::closePPO( qEdit, qHiliter, cFile, .t. ) } ) qEdit:show() ENDIF @@ -446,7 +446,7 @@ METHOD IdeEditor:showPPO( cFile ) METHOD IdeEditor:closePPO( qEdit, qHiliter, cFile, lDel ) - Qt_DisConnect_Event( qEdit, QEvent_Close ) + Qt_Events_DisConnect( ::pEvents, qEdit, QEvent_Close ) qHiliter:pPtr := 0 qEdit:close() @@ -475,4 +475,3 @@ METHOD IdeEditor:applyTheme( cTheme ) RETURN Self /*----------------------------------------------------------------------*/ - diff --git a/harbour/contrib/hbide/ideprojmanager.prg b/harbour/contrib/hbide/ideprojmanager.prg index 64b6d235ba..c2b3fa9ad3 100644 --- a/harbour/contrib/hbide/ideprojmanager.prg +++ b/harbour/contrib/hbide/ideprojmanager.prg @@ -178,7 +178,7 @@ METHOD IdeProjManager:loadProperties( cProject, lNew, lFetch, lUpdateTree ) IF lFetch ::fetchProperties() - IF !empty( ::cSaveTo ) .and. file( ::cSaveTo ) + IF !empty( ::cSaveTo ) .and. hb_FileExists( ::cSaveTo ) cProject := ::cSaveTo ::aPrjProps := hbide_fetchHbiStructFromFile( hbide_pathToOSPath( cProject ) ) /* Reload from file */ ENDIF @@ -754,7 +754,7 @@ METHOD IdeProjManager:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt ) FErase( cHbpPath ) ENDIF - IF lPPO .AND. File( cFileName ) + IF lPPO .AND. hb_FileExists( cFileName ) ::aEdits[ 1 ]:showPPO( cFileName ) ENDIF @@ -850,7 +850,7 @@ METHOD IdeProjManager:LaunchProject( cProject ) ENDIF #endif - IF !File( cTargetFN ) + IF !hb_FileExists( cTargetFN ) cTmp := "Launch application error: file not found " + cTargetFN + "!" ELSEIF aPrj[ PRJ_PRP_PROPERTIES, 2, E_qPrjType ] == "Executable" @@ -869,4 +869,3 @@ METHOD IdeProjManager:LaunchProject( cProject ) RETURN Self /*----------------------------------------------------------------------*/ - diff --git a/harbour/contrib/hbide/idethemes.prg b/harbour/contrib/hbide/idethemes.prg index ced2d55693..a608cdf74c 100644 --- a/harbour/contrib/hbide/idethemes.prg +++ b/harbour/contrib/hbide/idethemes.prg @@ -545,6 +545,7 @@ METHOD IdeThemes:updateAttribute( nAttr, iState ) METHOD IdeThemes:selectTheme() LOCAL cTheme := "" LOCAL oSL, oStrList, oStrModel, a_, nDone + LOCAL pSlots := Qt_Slots_New() oSL := XbpQtUiLoader():new( ::oIde:oDlg ) oSL:file := ::oIde:resPath + "selectionlist.ui" @@ -561,11 +562,11 @@ METHOD IdeThemes:selectTheme() oSL:qObj[ "listOptions" ]:setModel( oStrModel ) - Qt_Connect_Signal( oSL:qObj[ "listOptions" ], "doubleClicked(QModelIndex)", {|o,p| ::selectThemeProc( p, oSL, @cTheme, o ) } ) + Qt_Slots_Connect( pSlots, oSL:qObj[ "listOptions" ], "doubleClicked(QModelIndex)", {|o,p| ::selectThemeProc( p, oSL, @cTheme, o ) } ) nDone := oSL:exec() - Qt_DisConnect_Signal( oSL:qObj[ "listOptions" ], "doubleClicked(QModelIndex)" ) + Qt_Slots_Disconnect( pSlots, oSL:qObj[ "listOptions" ], "doubleClicked(QModelIndex)" ) RETURN iif( nDone == 1, cTheme, "" ) @@ -989,4 +990,3 @@ UserDictionary = UserDictionary 0,0,0 0,0,0 #endif /*----------------------------------------------------------------------*/ -