IDE: delphi converter: fix missing units after removing windows unit, bug #15641

git-svn-id: trunk@23686 -
This commit is contained in:
mattias 2010-02-11 09:14:52 +00:00
parent e01fe377a6
commit dbcecc82ab

View File

@ -703,15 +703,6 @@ begin
Result:=CheckFilenameForLCLPaths(LazarusUnitFilename);
if Result<>mrOk then exit;
// fix or comment missing units
DebugLn('ConvertDelphiToLazarusUnit FixMissingUnits');
Result:=FixMissingUnits(LazarusUnitFilename,cdtlufIsSubProc in Flags,true);
if Result=mrAbort then exit;
if (Result<>mrOk) then begin
Result:=JumpToCodetoolErrorAndAskToAbort(cdtlufIsSubProc in Flags);
exit;
end;
// add {$mode delphi} directive
// remove windows unit and add LResources, LCLIntf
// remove {$R *.dfm} or {$R *.xfm} directive
@ -724,6 +715,15 @@ begin
cdtlufIsSubProc in Flags,Result)
then exit;
// fix or comment missing units
DebugLn('ConvertDelphiToLazarusUnit FixMissingUnits');
Result:=FixMissingUnits(LazarusUnitFilename,cdtlufIsSubProc in Flags,true);
if Result=mrAbort then exit;
if (Result<>mrOk) then begin
Result:=JumpToCodetoolErrorAndAskToAbort(cdtlufIsSubProc in Flags);
exit;
end;
if cdtlufCheckLFM in Flags then begin
// check the LFM file and the pascal unit
DebugLn('ConvertDelphiToLazarusUnit Check new .lfm and .pas file');