mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 20:21:04 +02:00
Converter: fix a special case when a VCL unit is copied to project directory. Somehow LCL dependency was not added.
git-svn-id: trunk@41427 -
This commit is contained in:
parent
a9ad45f767
commit
5d1490e17c
@ -999,8 +999,8 @@ begin
|
|||||||
|
|
||||||
RemoveNonExistingFiles(false);
|
RemoveNonExistingFiles(false);
|
||||||
CleanUpCompilerOptionsSearchPaths(CompOpts);
|
CleanUpCompilerOptionsSearchPaths(CompOpts);
|
||||||
// LCL dependency is added automatically later for GUI applications.
|
// LCL dependency should be added automatically later for GUI applications
|
||||||
// AddPackageDependency('LCL');
|
AddPackageDependency('LCL'); // but in some special cases it is not.
|
||||||
// ToDo: make an option to add NoGUI to Project.CompilerOptions.LCLWidgetType.
|
// ToDo: make an option to add NoGUI to Project.CompilerOptions.LCLWidgetType.
|
||||||
if fProjPack is TProject then
|
if fProjPack is TProject then
|
||||||
PkgBoss.OpenProjectDependencies(fProjPack as TProject, true);
|
PkgBoss.OpenProjectDependencies(fProjPack as TProject, true);
|
||||||
|
@ -216,6 +216,7 @@ begin
|
|||||||
UsesNode:=UsesSectionNode;
|
UsesNode:=UsesSectionNode;
|
||||||
if UsesNode=nil then exit(true);
|
if UsesNode=nil then exit(true);
|
||||||
with fCTLink do begin
|
with fCTLink do begin
|
||||||
|
if not CodeTool.CheckDirectoryCache then exit(false);
|
||||||
CodeTool.MoveCursorToUsesStart(UsesNode);
|
CodeTool.MoveCursorToUsesStart(UsesNode);
|
||||||
repeat
|
repeat
|
||||||
// read next unit name
|
// read next unit name
|
||||||
@ -230,7 +231,8 @@ begin
|
|||||||
NewUnitName:=OldUnitName;
|
NewUnitName:=OldUnitName;
|
||||||
LowFileN:=LowerCase(NewUnitName);
|
LowFileN:=LowerCase(NewUnitName);
|
||||||
NewInFilename:=OldInFilename;
|
NewInFilename:=OldInFilename;
|
||||||
FullFileN:=CodeTool.FindUnitCaseInsensitive(NewUnitName,NewInFilename);
|
FullFileN:=CodeTool.DirectoryCache.FindUnitSourceInCompletePath(
|
||||||
|
NewUnitName,NewInFilename,True,True);
|
||||||
if FullFileN<>'' then begin // * Unit found *
|
if FullFileN<>'' then begin // * Unit found *
|
||||||
OmitUnit := Settings.OmitProjUnits.Contains(NewUnitName);
|
OmitUnit := Settings.OmitProjUnits.Contains(NewUnitName);
|
||||||
// Report omitted units as missing, pretend they don't exist here,
|
// Report omitted units as missing, pretend they don't exist here,
|
||||||
@ -288,7 +290,8 @@ begin
|
|||||||
[AOldName, ANewName]), '', -1);
|
[AOldName, ANewName]), '', -1);
|
||||||
// If the unit is not found, open the package containing it.
|
// If the unit is not found, open the package containing it.
|
||||||
UnitInFileName:='';
|
UnitInFileName:='';
|
||||||
if fCTLink.CodeTool.FindUnitCaseInsensitive(ANewName,UnitInFileName) = '' then
|
if fCTLink.CodeTool.DirectoryCache.FindUnitSourceInCompletePath(
|
||||||
|
ANewName,UnitInFileName,True,False) = '' then
|
||||||
if Assigned(fOwnerTool.OnCheckPackageDependency) then
|
if Assigned(fOwnerTool.OnCheckPackageDependency) then
|
||||||
if not fOwnerTool.OnCheckPackageDependency(ANewName) then
|
if not fOwnerTool.OnCheckPackageDependency(ANewName) then
|
||||||
;
|
;
|
||||||
@ -710,7 +713,8 @@ begin
|
|||||||
IDEMessagesWindow.AddMsg('Added unit '+AUnitName+ ' to uses section', '', -1);
|
IDEMessagesWindow.AddMsg('Added unit '+AUnitName+ ' to uses section', '', -1);
|
||||||
// If the unit is not found, open the package containing it.
|
// If the unit is not found, open the package containing it.
|
||||||
UnitInFileName:='';
|
UnitInFileName:='';
|
||||||
if fCTLink.CodeTool.FindUnitCaseInsensitive(AUnitName,UnitInFileName) = '' then
|
if fCTLink.CodeTool.DirectoryCache.FindUnitSourceInCompletePath(
|
||||||
|
AUnitName,UnitInFileName,True,False) = '' then
|
||||||
if Assigned(fOnCheckPackageDependency) then
|
if Assigned(fOnCheckPackageDependency) then
|
||||||
if not fOnCheckPackageDependency(AUnitName) then
|
if not fOnCheckPackageDependency(AUnitName) then
|
||||||
;
|
;
|
||||||
|
Loading…
Reference in New Issue
Block a user