mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 18:58:04 +02:00
Converter: Search package and unit for missing component class only for project and package conversion. Issue #24527
git-svn-id: trunk@41730 -
This commit is contained in:
parent
51a7ea5e7a
commit
0f05e34b89
@ -674,6 +674,8 @@ begin
|
||||
LfmFixer.RootMustBeClassInUnit:=true;
|
||||
LfmFixer.RootMustBeClassInIntf:=true;
|
||||
LfmFixer.ObjectsMustExist:=true;
|
||||
// Package dependencies will be there only for projects and packages.
|
||||
LfmFixer.TryAddingUsedUnits:=fOwnerConverter is TConvertDelphiProjPack;
|
||||
if LfmFixer.ConvertAndRepair<>mrOK then begin
|
||||
LazarusIDE.DoJumpToCompilerMessage(-1,true);
|
||||
fOwnerConverter.fErrorMsg:='Problems when repairing form file '
|
||||
|
@ -73,6 +73,7 @@ type
|
||||
fCTLink: TCodeToolLink;
|
||||
fSettings: TConvertSettings;
|
||||
fUsedUnitsTool: TUsedUnitsTool;
|
||||
fTryAddingUsedUnits: Boolean;
|
||||
// List of property values which need to be adjusted.
|
||||
fHasMissingProperties: Boolean; // LFM file has unknown properties.
|
||||
fHasMissingObjectTypes: Boolean; // LFM file has unknown object types.
|
||||
@ -96,6 +97,7 @@ type
|
||||
public
|
||||
property Settings: TConvertSettings read fSettings write fSettings;
|
||||
property UsedUnitsTool: TUsedUnitsTool read fUsedUnitsTool write fUsedUnitsTool;
|
||||
property TryAddingUsedUnits: Boolean read fTryAddingUsedUnits write fTryAddingUsedUnits;
|
||||
end;
|
||||
|
||||
|
||||
@ -541,7 +543,9 @@ begin
|
||||
if not fLFMTree.ParseIfNeeded then
|
||||
Exit(mrCancel);
|
||||
if CodeToolBoss.CheckLFM(fPascalBuffer, fLFMBuffer, fLFMTree,
|
||||
fRootMustBeClassInUnit, fRootMustBeClassInIntf, fObjectsMustExist) then
|
||||
fRootMustBeClassInUnit, fRootMustBeClassInIntf, fObjectsMustExist)
|
||||
or not fTryAddingUsedUnits
|
||||
then
|
||||
Result:=mrOk
|
||||
else begin
|
||||
Result:=FindAndFixMissingComponentClasses; // Can return mrRetry.
|
||||
|
Loading…
Reference in New Issue
Block a user