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