Converter: improve reporting missing units.

git-svn-id: trunk@29513 -
This commit is contained in:
juha 2011-02-13 12:04:52 +00:00
parent cd87a812cc
commit 2e2e795109
2 changed files with 6 additions and 3 deletions

View File

@ -390,6 +390,7 @@ begin
Add('FastMM4'); Add('FastMM4');
Add('FastMM4Messages'); Add('FastMM4Messages');
Add('OpenGL'); Add('OpenGL');
CaseSensitive:=False;
Sorted:=True; Sorted:=True;
end; end;

View File

@ -199,6 +199,8 @@ var
OldUnitName, OldInFilename: String; OldUnitName, OldInFilename: String;
NewUnitName, NewInFilename: String; NewUnitName, NewInFilename: String;
AFilename, s, slo: String; AFilename, s, slo: String;
x: Integer;
OmitUnit: Boolean;
begin begin
UsesNode:=UsesSectionNode; UsesNode:=UsesSectionNode;
if UsesNode=nil then exit(true); if UsesNode=nil then exit(true);
@ -221,8 +223,8 @@ begin
if NewInFilename<>'' then if NewInFilename<>'' then
s:=s+' in '''+NewInFilename+''''; s:=s+' in '''+NewInFilename+'''';
if AFilename<>'' then begin // unit found if AFilename<>'' then begin // unit found
if (NewUnitName<>OldUnitName) and OmitUnit:=Settings.OmitProjUnits.Find(NewUnitName, x);
not AUnitUpdater.FindReplacement(NewUnitName, slo) then begin if (NewUnitName<>OldUnitName) and not OmitUnit then begin
// Character case differs and it will not be replaced. // Character case differs and it will not be replaced.
fUnitsToFixCase[OldUnitName]:=NewUnitName; // fix case fUnitsToFixCase[OldUnitName]:=NewUnitName; // fix case
IDEMessagesWindow.AddMsg(Format(lisConvDelphiFixedUnitCase, IDEMessagesWindow.AddMsg(Format(lisConvDelphiFixedUnitCase,
@ -231,7 +233,7 @@ begin
// Report Windows specific units as missing if target is MultiPlatform, // Report Windows specific units as missing if target is MultiPlatform,
// needed if work-platform is Windows (kind of a hack). // needed if work-platform is Windows (kind of a hack).
slo:=LowerCase(NewUnitName); // 'variants' ? slo:=LowerCase(NewUnitName); // 'variants' ?
if Settings.MultiPlatform and ((slo='windows') or (slo='shellapi')) then if (Settings.MultiPlatform and ((slo='windows') or (slo='shellapi'))) or OmitUnit then
fMissingUnits.Add(s); fMissingUnits.Add(s);
end end
else begin else begin