mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 01:02:41 +02:00
codetools: accelerated loading include links
git-svn-id: trunk@14190 -
This commit is contained in:
parent
fc54ba9a4c
commit
e0c523e862
@ -708,6 +708,7 @@ var LinkCnt, i: integer;
|
|||||||
LastTimeUsed, CurrDate: TDateTime;
|
LastTimeUsed, CurrDate: TDateTime;
|
||||||
IncludeFilename, IncludedByFile, APath: string;
|
IncludeFilename, IncludedByFile, APath: string;
|
||||||
NewLink: TIncludedByLink;
|
NewLink: TIncludedByLink;
|
||||||
|
CurrDateStr: String;
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
FIncludeLinks.FreeAndClear;
|
FIncludeLinks.FreeAndClear;
|
||||||
@ -716,14 +717,13 @@ begin
|
|||||||
FExpirationTimeInDays);
|
FExpirationTimeInDays);
|
||||||
LinkCnt:=XMLConfig.GetValue(XMLPath+'IncludeLinks/Count',0);
|
LinkCnt:=XMLConfig.GetValue(XMLPath+'IncludeLinks/Count',0);
|
||||||
CurrDate:=Date;
|
CurrDate:=Date;
|
||||||
|
CurrDateStr:=DateToStr(CurrDate);
|
||||||
for i:=0 to LinkCnt-1 do begin
|
for i:=0 to LinkCnt-1 do begin
|
||||||
APath:=XMLPath+'IncludeLinks/Link'+IntToStr(i)+'/';
|
APath:=XMLPath+'IncludeLinks/Link'+IntToStr(i)+'/';
|
||||||
try
|
if not TryStrToDate(XMLConfig.GetValue(APath+'LastTimeUsed/Value',
|
||||||
LastTimeUsed:=StrToDate(XMLConfig.GetValue(APath+'LastTimeUsed/Value',
|
CurrDateStr),LastTimeUsed)
|
||||||
DateToStr(CurrDate)));
|
then
|
||||||
except
|
|
||||||
LastTimeUsed:=CurrDate;
|
LastTimeUsed:=CurrDate;
|
||||||
end;
|
|
||||||
|
|
||||||
// ToDo: check if link has expired
|
// ToDo: check if link has expired
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user