mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 12:00:29 +02:00
IDE: Formatting and cleanup.
git-svn-id: trunk@64438 -
This commit is contained in:
parent
c32adb1c7f
commit
2ba0ae90c4
@ -1379,8 +1379,7 @@ begin
|
||||
'{*.pas,*.pp,*.p,*.inc,Makefile.fpc}',8,OnProgress);
|
||||
end;
|
||||
|
||||
function MakeRelativeFileList(Files: TStrings; out BaseDir: string
|
||||
): TStringList;
|
||||
function MakeRelativeFileList(Files: TStrings; out BaseDir: string): TStringList;
|
||||
var
|
||||
BaseDirLen: Integer;
|
||||
i: Integer;
|
||||
|
@ -568,7 +568,6 @@ begin
|
||||
FDebuggerFileHistory := TStringList.Create;
|
||||
FDebuggerFileHistory.OwnsObjects := True;
|
||||
FCopiedDbgPropertiesConfigList := TDebuggerPropertiesConfigList.Create;
|
||||
FCopiedDbgPropertiesConfigList.CaseSensitive := False;
|
||||
// create the PropertyGrid
|
||||
PropertyGrid:=TOIPropertyGrid.CreateWithParams(Self,FPropertyEditorHook
|
||||
,[tkUnknown, tkInteger, tkChar, tkEnumeration, tkFloat, tkSet{, tkMethod}
|
||||
|
@ -2902,13 +2902,17 @@ begin
|
||||
|
||||
if PCTargetChanged or LCLTargetChanged then begin
|
||||
if ConsoleVerbosity>=0 then
|
||||
DebugLn(['Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=',OldTargetCPU,'-',OldTargetOS,'-',OldLCLWidgetType,' New=',fTargetCPU,'-',fTargetOS,'-',fLCLWidgetType,' Changed: OS/CPU=',PCTargetChanged,' LCL=',LCLTargetChanged]);
|
||||
DebugLn(['Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=',OldTargetCPU,
|
||||
'-',OldTargetOS,'-',OldLCLWidgetType,' New=',fTargetCPU,'-',fTargetOS,
|
||||
'-',fLCLWidgetType,' Changed: OS/CPU=',PCTargetChanged,' LCL=',LCLTargetChanged]);
|
||||
end;
|
||||
if LCLTargetChanged then
|
||||
CodeToolBoss.SetGlobalValue(ExternalMacroStart+'LCLWidgetType',fLCLWidgetType);
|
||||
if ScanFPCSrc<>smsfsSkip then
|
||||
RescanCompilerDefines(false,false,ScanFPCSrc=smsfsWaitTillDone,Quiet);
|
||||
//if (PackageGraph<>nil) and (PackageGraph.CodeToolsPackage<>nil) then debugln(['TBuildManager.SetBuildTarget CODETOOLS OUTDIR=',PackageGraph.CodeToolsPackage.CompilerOptions.GetUnitOutPath(true,coptParsed),' ',PackageGraph.CodeToolsPackage.CompilerOptions.ParsedOpts.ParsedStamp[pcosOutputDir],' ',CompilerParseStamp]);
|
||||
//if (PackageGraph<>nil) and (PackageGraph.CodeToolsPackage<>nil) then
|
||||
// debugln(['TBuildManager.SetBuildTarget CODETOOLS OUTDIR=',PackageGraph.CodeToolsPackage.CompilerOptions.GetUnitOutPath(true,coptParsed),
|
||||
// ' ',PackageGraph.CodeToolsPackage.CompilerOptions.ParsedOpts.ParsedStamp[pcosOutputDir],' ',CompilerParseStamp]);
|
||||
end;
|
||||
|
||||
procedure TBuildManager.SetBuildTargetProject1;
|
||||
|
@ -525,7 +525,7 @@ type
|
||||
|
||||
{ TDebuggerPropertiesConfigList }
|
||||
|
||||
TDebuggerPropertiesConfigList = class(TStringList)
|
||||
TDebuggerPropertiesConfigList = class(TStringListUTF8Fast)
|
||||
private
|
||||
function GetOpt(Index: Integer): TDebuggerPropertiesConfig;
|
||||
public
|
||||
@ -1200,8 +1200,7 @@ end;
|
||||
|
||||
{ TDebuggerPropertiesConfigList }
|
||||
|
||||
function TDebuggerPropertiesConfigList.GetOpt(Index: Integer
|
||||
): TDebuggerPropertiesConfig;
|
||||
function TDebuggerPropertiesConfigList.GetOpt(Index: Integer): TDebuggerPropertiesConfig;
|
||||
begin
|
||||
Result := TDebuggerPropertiesConfig(Objects[Index]);
|
||||
end;
|
||||
@ -1219,18 +1218,20 @@ function TDebuggerPropertiesConfigList.EntryByName(AConfName, AConfClass: String
|
||||
): TDebuggerPropertiesConfig;
|
||||
var
|
||||
i: Integer;
|
||||
dpCfg: TDebuggerPropertiesConfig;
|
||||
begin
|
||||
Result := nil;
|
||||
i := Count - 1;
|
||||
while (i >= 0) and (
|
||||
Opt[i].IsDeleted or (not Opt[i].IsLoaded) or
|
||||
(Opt[i].ConfigName <> AConfName) or
|
||||
(Opt[i].ConfigClass <> AConfClass)
|
||||
)
|
||||
do
|
||||
while i >= 0 do begin
|
||||
dpCfg := Opt[i];
|
||||
if (not dpCfg.IsDeleted) and dpCfg.IsLoaded
|
||||
and (dpCfg.ConfigName = AConfName)
|
||||
and (dpCfg.ConfigClass = AConfClass) then
|
||||
Break;
|
||||
dec(i);
|
||||
end;
|
||||
if i >= 0 then
|
||||
Result := Opt[i];
|
||||
Result := dpCfg;
|
||||
end;
|
||||
|
||||
function TDebuggerPropertiesConfigList.EntryByUid(AnUid: String
|
||||
|
@ -42,7 +42,7 @@ type
|
||||
TFPCSrcScan = class(TThread)
|
||||
protected
|
||||
fLogMsg: string;
|
||||
Files: TStringList;
|
||||
fFiles: TStringList;
|
||||
procedure Execute; override;
|
||||
procedure OnFilesGathered; // main thread, called after thread has collected Files
|
||||
procedure MainThreadLog;
|
||||
@ -102,15 +102,15 @@ begin
|
||||
try
|
||||
Log('TFPCSrcScan.Execute START '+Directory);
|
||||
// scan fpc source directory, check for terminated
|
||||
Files:=GatherFilesInFPCSources(Directory,nil);
|
||||
Log('TFPCSrcScan.Execute found some files: '+dbgs((Files<>nil) and (Files.Count>0)));
|
||||
fFiles:=GatherFilesInFPCSources(Directory,nil);
|
||||
Log('TFPCSrcScan.Execute found some files: '+dbgs((fFiles<>nil) and (fFiles.Count>0)));
|
||||
except
|
||||
on E: Exception do begin
|
||||
Log('TFPCSrcScan.Execute error: '+E.Message);
|
||||
end;
|
||||
end;
|
||||
if Files=nil then
|
||||
Files:=TStringList.Create;
|
||||
if fFiles=nil then
|
||||
fFiles:=TStringList.Create;
|
||||
// let main thread update the codetools fpc source cache
|
||||
Synchronize(@OnFilesGathered);
|
||||
end;
|
||||
@ -118,7 +118,7 @@ end;
|
||||
procedure TFPCSrcScan.OnFilesGathered;
|
||||
begin
|
||||
try
|
||||
ApplyFPCSrcFiles(Directory,Files);
|
||||
ApplyFPCSrcFiles(Directory,fFiles);
|
||||
// delete item in progress window
|
||||
debugln(['TFPCSrcScan.OnFilesGathered closing progress item ...']);
|
||||
ProgressItem.Window.Close;
|
||||
|
@ -36,12 +36,9 @@ type
|
||||
procedure pmiInsRowClick(Sender: TObject);
|
||||
procedure SetDefaultMenuItemClick(Sender: TObject);
|
||||
private
|
||||
FList: TStringList;
|
||||
fLoaded: boolean;
|
||||
fSaved: boolean;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
function GetTitle: String; override;
|
||||
procedure Setup({%H-}ADialog: TAbstractOptionsEditorDialog); override;
|
||||
procedure ReadSettings({%H-}AOptions: TAbstractIDEOptions); override;
|
||||
@ -274,18 +271,6 @@ begin
|
||||
LoadGridFromFileDialogFilter(grdFileFilters,GetDefaultFileDialogFilter,false);
|
||||
end;
|
||||
|
||||
constructor TFileFiltersOptionsFrame.Create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
FList := TStringList.Create;
|
||||
end;
|
||||
|
||||
destructor TFileFiltersOptionsFrame.Destroy;
|
||||
begin
|
||||
FList.Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TFileFiltersOptionsFrame.GetTitle: String;
|
||||
begin
|
||||
Result := lisFileFilters;
|
||||
|
Loading…
Reference in New Issue
Block a user