mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-27 02:33:38 +02:00
IDE: fixed checking if unit has lrs include directive
git-svn-id: trunk@23517 -
This commit is contained in:
parent
56be34be3a
commit
ceee76be78
@ -1123,7 +1123,6 @@ begin
|
||||
if FileExistsUTF8(LRSFilename)
|
||||
and (FileAgeUTF8(LFMFilename)<=FileAgeUTF8(LRSFilename))
|
||||
then exit;
|
||||
debugln('TBuildManager.UpdateLRSFromLFM ',LRSFilename,' LFMAge=',dbgs(FileAgeUTF8(LFMFilename)),' LRSAge=',dbgs(FileAgeUTF8(LRSFilename)));
|
||||
// the .lrs file does not exist, or is older than the .lfm file
|
||||
// -> update .lrs file
|
||||
Dir:=ExtractFilePath(LRSFilename);
|
||||
|
@ -170,6 +170,7 @@ begin
|
||||
if (PointPos<>nil) and (d-PointPos=4) and (PointPos[1]='l') and
|
||||
(PointPos[2]='r') and (PointPos[3]='s') then
|
||||
begin
|
||||
//DebugLn(['ParseResourceType ',copy(Src,p,PointPos-@Src[p]+3)]);
|
||||
// using include directive with lrs file
|
||||
HasLRSIncludeDirective := True;
|
||||
end;
|
||||
@ -262,6 +263,8 @@ begin
|
||||
ParseResourceType(Code.Source,
|
||||
CodeToolBoss.GetNestedCommentsFlagForFile(Code.Filename),
|
||||
Item.HasLRSIncludeDirective, Item.HasRDirective);
|
||||
HasLRSIncludeDirective := Item.HasLRSIncludeDirective;
|
||||
HasRDirective := Item.HasRDirective;
|
||||
end;
|
||||
|
||||
var
|
||||
@ -274,6 +277,7 @@ begin
|
||||
if ResourceTypesCache = nil then
|
||||
ResourceTypesCache := TResourceTypesCache.Create;
|
||||
ResourceTypesCache.Parse(Code, HasLRSIncludeDirective, HasRDirective);
|
||||
DebugLn(['GuessResourceType ',Code.Filename,' HasLRS=',HasLRSIncludeDirective,' HasR=',HasRDirective]);
|
||||
if HasLRSIncludeDirective then
|
||||
begin
|
||||
Typ := rtLRS;
|
||||
|
Loading…
Reference in New Issue
Block a user