From a9154fe7600e1b37c6d8c838944ef711a4393516 Mon Sep 17 00:00:00 2001 From: juha Date: Thu, 3 Jul 2014 11:50:52 +0000 Subject: [PATCH] IDE: reorder the code for reading a project. git-svn-id: trunk@45760 - --- ide/project.pp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ide/project.pp b/ide/project.pp index 12a3d2b33b..40c20083ef 100644 --- a/ide/project.pp +++ b/ide/project.pp @@ -1167,6 +1167,8 @@ implementation const ProjectInfoFileVersion = 9; + ProjOptionsPath = 'ProjectOptions/'; + function AddCompileReasonsDiff(const PropertyName: string; const Old, New: TCompileReasons; Tool: TCompilerDiffTool): boolean; @@ -2823,12 +2825,6 @@ var Path: String; begin Path:='ProjectOptions/'; - // get format - fStorePathDelim:=CheckPathDelim(FXMLConfig.GetValue(Path+'PathDelim/Value','/'),fPathDelimChanged); - fCurStorePathDelim:=StorePathDelim; - - {$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TProject.ReadProject C reading values');{$ENDIF} - FFileVersion:= FXMLConfig.GetValue(Path+'Version/Value',0); if not FLoadParts then begin if (FFileVersion=0) and (FXMLConfig.GetValue(Path+'Units/Count',0)=0) then @@ -2870,16 +2866,10 @@ begin FXMLConfig.GetValue(Path+'i18n/OutDir/Value', ''),fPathDelimChanged); end; {$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TProject.ReadProject E reading comp sets');{$ENDIF} - end; - // load MacroValues and compiler options - ClearBuildModes; - BuildModes.LoadProjOptsFromXMLConfig(FXMLConfig, Path); - // load matrix options - BuildModes.SharedMatrixOptions.LoadFromXMLConfig(FXMLConfig, Path+'BuildModes/SharedMatrixOptions/'); - // Resources - if not FLoadParts then - begin + + // Resources ProjResources.ReadFromProjectFile(FXMLConfig, Path); + // load custom data LoadStringToStringTree(FXMLConfig,CustomData,Path+'CustomData/'); {$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TProject.ReadProject update ct boss');{$ENDIF} @@ -2980,7 +2970,17 @@ begin end; try + // get format + fStorePathDelim:=CheckPathDelim(FXMLConfig.GetValue('ProjectOptions/PathDelim/Value','/'),fPathDelimChanged); + fCurStorePathDelim:=StorePathDelim; + {$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TProject.ReadProject C reading values');{$ENDIF} + FFileVersion:= FXMLConfig.GetValue('ProjectOptions/Version/Value',0); LoadFromLPI; + // load MacroValues and compiler options + ClearBuildModes; + BuildModes.LoadProjOptsFromXMLConfig(FXMLConfig, ProjOptionsPath); + // load matrix options + BuildModes.SharedMatrixOptions.LoadFromXMLConfig(FXMLConfig, 'ProjectOptions/BuildModes/SharedMatrixOptions/'); finally {$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TProject.ReadProject freeing xml');{$ENDIF} fPathDelimChanged:=false;