ide: less hints

This commit is contained in:
mattias 2023-06-12 06:49:22 +02:00
parent e21408456e
commit 033c256b3a
10 changed files with 27 additions and 28 deletions

View File

@ -3240,7 +3240,7 @@ begin
P := TWinControlAccess(AWinControl).GetClientScrollOffset;
R := AWinControl.ClientRect;
R.BottomRight := R.BottomRight + Point(GridSizeX, GridSizeY);
OffsetRect(R, RoundToMultiple(P.X, GridSizeX), RoundToMultiple(P.Y, GridSizeY));
Types.OffsetRect(R, RoundToMultiple(P.X, GridSizeX), RoundToMultiple(P.Y, GridSizeY));
DrawGrid(ADDC.Canvas.Handle, R, GridSizeX, GridSizeY);
end;
@ -3571,7 +3571,7 @@ begin
FDDC.Canvas.SaveHandleState;
OwnerRect := TControl(AComponent).ClientRect;
Diff := GetParentFormRelativeClientOrigin(AComponent);
OffsetRect(OwnerRect, Diff.X, Diff.Y);
Types.OffsetRect(OwnerRect, Diff.X, Diff.Y);
with OwnerRect do
RGN := CreateRectRGN(Left, Top, Right, Bottom);
SelectClipRGN(FDDC.DC, RGN);

View File

@ -1341,7 +1341,7 @@ begin
ms:=TMemoryStream.Create;
WriteXMLFile(Doc,ms,[xwfPreserveWhiteSpace]);
ms.Position:=0;
SetLength(s,ms.Size);
SetLength(s{%H-},ms.Size);
if s<>'' then
ms.Read(s[1],length(s));
// copy to codebuffer
@ -1507,7 +1507,7 @@ begin
ms:=TMemoryStream.Create;
WriteXMLFile(ADocFile.Doc,ms,[xwfPreserveWhiteSpace]);
ms.Position:=0;
SetLength(s,ms.Size);
SetLength(s{%H-},ms.Size);
if s<>'' then
ms.Read(s[1],length(s));
finally

View File

@ -236,7 +236,7 @@ var
begin
Result:= mrCancel;
SetLength(Str, 2);
SetLength(Str{%H-}, 2);
Str[0]:= AToken;
Str[1]:= AComment;
@ -258,7 +258,7 @@ begin
Result:= mrCancel;
if (AIndex<0) or (AIndex>=ASynAutoComplete.Completions.Count) then exit;
SetLength(Str, 2);
SetLength(Str{%H-}, 2);
Str[0]:= ASynAutoComplete.Completions[AIndex];
Str[1]:= ASynAutoComplete.CompletionComments[AIndex];
@ -625,7 +625,7 @@ function CodeMacroPrevWord(const Parameter: string;
if macro to delete words in the beginning of the line
}
var
Line,s: String;
Line: String;
p: TPoint;
CodeXYPos: TCodeXYPosition;
re : TRegExpr;

View File

@ -48,7 +48,7 @@ uses
InterfaceBase,
// LazUtils
FileUtil, LazFileUtils, LazUTF8, Laz2_XMLCfg, Laz2_DOM, LazUtilities, LazTracer,
LazStringUtils,
LazStringUtils, FPCAdds,
// CodeTools
FileProcs, DefineTemplates, CodeToolsCfgScript, CodeToolManager,
KeywordFuncLists, BasicCodeTools, LinkScanner,
@ -1053,13 +1053,13 @@ begin
begin
VarName:=GetCTCSVariableAsString(Value);
if CompareIdentifiers(PChar(VarName),'OS')=0 then
SetCTCSVariableAsString(Value,GetCompiledTargetOS)
SetCTCSVariableAsString(Value,FPCAdds.GetCompiledTargetOS)
else if CompareIdentifiers(PChar(VarName),'CPU')=0 then
SetCTCSVariableAsString(Value,GetCompiledTargetCPU)
SetCTCSVariableAsString(Value,FPCAdds.GetCompiledTargetCPU)
else if CompareIdentifiers(PChar(VarName),'SrcOS')=0 then
SetCTCSVariableAsString(Value,GetDefaultSrcOSForTargetOS(GetCompiledTargetOS))
SetCTCSVariableAsString(Value,GetDefaultSrcOSForTargetOS(FPCAdds.GetCompiledTargetOS))
else if CompareIdentifiers(PChar(VarName),'SrcOS2')=0 then
SetCTCSVariableAsString(Value,GetDefaultSrcOS2ForTargetOS(GetCompiledTargetOS))
SetCTCSVariableAsString(Value,GetDefaultSrcOS2ForTargetOS(FPCAdds.GetCompiledTargetOS))
else if CompareIdentifiers(PChar(VarName),'LCLWidgetType')=0 then
SetCTCSVariableAsString(Value,GetLCLWidgetTypeName)
else
@ -1970,7 +1970,7 @@ begin
PathName := ExtractFilePath(AFilename);
//debugln ( 'Filename is ',FileName, ' in PrependDefaultType' );
CurTargetOS:=TargetOS;
if CurTargetOS='' then CurTargetOS:=GetCompiledTargetOS;
if CurTargetOS='' then CurTargetOS:=FPCAdds.GetCompiledTargetOS;
aSrcOS:=GetDefaultSrcOSForTargetOS(CurTargetOS);
if CompareText(aSrcOS, 'unix') = 0 then
AFilename:=PathName+Prefix+UTF8LowerCase(FileName)
@ -2153,7 +2153,7 @@ begin
end;
end;
if Result='' then
Result:=GetCompiledTargetOS;
Result:=FPCAdds.GetCompiledTargetOS;
end;
function TBaseCompilerOptions.GetEffectiveTargetCPU: string;
@ -2176,7 +2176,7 @@ begin
end;
end;
if Result='' then
Result:=GetCompiledTargetCPU;
Result:=FPCAdds.GetCompiledTargetCPU;
end;
function TBaseCompilerOptions.GetEffectiveLCLWidgetType: string;

View File

@ -5332,7 +5332,7 @@ function TEditorOptions.LoadCodeTemplates(AnAutoComplete: TSynEditAutoComplete
begin
data := TResourceStream.Create(HInstance, PChar('lazarus_dci_file'), PChar(RT_RCDATA));
i := data.Size;
SetLength(Result, i);
SetLength(Result{%H-}, i);
if i > 0 then
data.Read(Result[1], i);
data.Free;

View File

@ -34,6 +34,7 @@ uses
// Fppkg
pkgglobals,
// LazUtils
FPCAdds,
LazFileUtils,
LazFileCache,
UTF8Process,
@ -170,10 +171,10 @@ begin
CheckPath('/usr/lib/fpc', FpcPrefixCombobox.Items);
CheckPath('/usr/lib64/fpc', FpcPrefixCombobox.Items);
{$IFDEF Linux}
CheckPath('/usr/lib/'+GetCompiledTargetCPU+'-linux-gnu/fpc/default', FpcPrefixCombobox.Items);
CheckPath('/usr/lib/'+FPCAdds.GetCompiledTargetCPU+'-linux-gnu/fpc/default', FpcPrefixCombobox.Items);
{$IFDEF CPUARM}
CheckPath('/usr/lib/'+GetCompiledTargetCPU+'-linux-gnueabi/fpc/default', FpcPrefixCombobox.Items);
CheckPath('/usr/lib/'+GetCompiledTargetCPU+'-linux-gnueabihf/fpc/default', FpcPrefixCombobox.Items);
CheckPath('/usr/lib/'+FPCAdds.GetCompiledTargetCPU+'-linux-gnueabi/fpc/default', FpcPrefixCombobox.Items);
CheckPath('/usr/lib/'+FPCAdds.GetCompiledTargetCPU+'-linux-gnueabihf/fpc/default', FpcPrefixCombobox.Items);
{$ENDIF}
{$ENDIF}
CheckPath('/usr/local/lib/fpc', FpcPrefixCombobox.Items);

View File

@ -37,7 +37,8 @@ uses
// CodeTools
DefineTemplates, CodeToolManager, FileProcs,
// LazUtils
LazFileCache, LazUTF8, LazFileUtils, FileUtil, LazLoggerBase, Laz2_XMLCfg,
FPCAdds, LazFileCache, LazUTF8, LazFileUtils, FileUtil, LazLoggerBase,
Laz2_XMLCfg,
// IDEIntf
IdeIntfStrConsts,
// IDE

View File

@ -572,7 +572,6 @@ var
n: Integer;
Locals: TIDELocals;
Snap: TSnapshot;
s: String;
LVal: TIdeLocalsValue;
VNode, VN2: PVirtualNode;
begin
@ -802,7 +801,6 @@ end;
procedure TLocalsDlg.ClearTree(OnlyClearNodeData: boolean);
var
LVal: TLocalsValue;
VNode: PVirtualNode;
begin
for VNode in vtLocals.NoInitNodes do begin

View File

@ -32,11 +32,10 @@
- clean build
- error cant find include file
unit_f_cant_find_ppu=10022_F_Can't find unit $1 used by $2
unit_u_ppu_invalid_header=10007_U_PPU Invalid Header (no PPU at the begin)
unit_f_cant_compile_unit=10021_F_Can't compile unit $1, no sources available
unit_f_cant_find_ppu=10022_F_Can't find unit $1 used by $2
unit_w_unit_name_error=10023_W_Unit $1 was not found but $2 exists
unit_f_unit_name_error=10024_F_Unit $1 searched but $2 found
unit_u_ppu_invalid_header=10007_U_PPU Invalid Header (no PPU at the begin)
unit_f_cant_compile_unit=10021_F_Can't compile unit $1, no sources available
unit_u_recompile_crc_change=10028_U_Recompiling $1, checksum changed for $2
unit_u_recompile_source_found_alone=10029_U_Recompiling $1, source found only
unit_u_recompile_staticlib_is_older=10030_U_Recompiling unit, static lib is older than ppufile
@ -61,7 +60,7 @@ uses
// CodeTools
BasicCodeTools, DefineTemplates, CodeToolManager, FileProcs,
// LazUtils
LazFileUtils, LazFileCache, LazTracer,
FPCAdds, LazFileUtils, LazFileCache, LazTracer,
// IDEIntf
ProjectIntf, CompOptsIntf, IDEWindowIntf, LazIDEIntf, IDEMsgIntf, IDEExternToolIntf,
// IDE

View File

@ -50,7 +50,7 @@ uses
Forms, Controls, Dialogs, LCLProc,
// LazUtils
FileUtil, LazFileCache, LazLoggerBase, LazUtilities, LazFileUtils, LazUTF8,
Laz2_XMLCfg, Laz2_XMLRead, LazStringUtils, AvgLvlTree,
Laz2_XMLCfg, Laz2_XMLRead, LazStringUtils, AvgLvlTree, FPCAdds,
// codetools
FileProcs, DefineTemplates, CodeToolManager, CodeCache, DirectoryCacher,
BasicCodeTools, NonPascalCodeTools, SourceChanger,
@ -643,7 +643,7 @@ begin
continue;
'C':
if (StartPos+2<=length(CompParams)) and (CompParams[StartPos+2]='g')
and TargetNeedsFPCOptionCG(GetCompiledTargetOS,GetCompiledTargetCPU)
and TargetNeedsFPCOptionCG(FPCAdds.GetCompiledTargetOS,FPCAdds.GetCompiledTargetCPU)
then begin
// the -Cg parameter is added automatically on Linux, but not in the
// Makefile.compiled, because that is platform independent.