sqldb: use source unitname

This commit is contained in:
mattias 2022-04-15 01:21:51 +02:00
parent 5c4f4fda3b
commit 65e925bb3a
2 changed files with 6 additions and 6 deletions

View File

@ -128,7 +128,7 @@ uses
IDEExternToolIntf,
ComponentEditors,
fieldseditor,
bufdatasetdsgn,
bufdatasetdsgn, PropEditUtils,
CodeCache,
CodeToolManager;
@ -485,7 +485,7 @@ begin
begin
ConnDef := GetConnectionDef(NewValue);
if Assigned(ConnDef) then
CodeToolBoss.AddUnitToMainUsesSection(Code, ConnDef.UnitName, '');
CodeToolBoss.AddUnitToMainUsesSection(Code, GetSourceClassUnitName(ConnDef.ClassType), '');
end;
inherited;
end;

View File

@ -5,9 +5,9 @@ unit reglazsqldbrest;
interface
uses
Classes, SysUtils, PropEdits, ComponentEditors, ProjectIntf, sqldb, sqldbrestschema,
sqldbrestcsv ,sqldbrestxml, sqldbrestcds, sqldbrestado,
sqldbrestio, sqldbrestauth, sqldbrestbridge, sqldbrestmodule;
Classes, SysUtils, PropEdits, ComponentEditors, PropEditUtils, ProjectIntf,
sqldb, sqldbrestschema, sqldbrestcsv, sqldbrestxml, sqldbrestcds,
sqldbrestado, sqldbrestio, sqldbrestauth, sqldbrestbridge, sqldbrestmodule;
Type
@ -613,7 +613,7 @@ begin
begin
ConnDef := GetConnectionDef(NewValue);
if Assigned(ConnDef) then
CodeToolBoss.AddUnitToMainUsesSection(Code, ConnDef.UnitName, '');
CodeToolBoss.AddUnitToMainUsesSection(Code, GetSourceClassUnitName(ConnDef.ClassType), '');
end;
inherited;
end;