From 65e925bb3a1ec937ed1feb48f544958d6ccd02ef Mon Sep 17 00:00:00 2001 From: mattias Date: Fri, 15 Apr 2022 01:21:51 +0200 Subject: [PATCH] sqldb: use source unitname --- components/sqldb/registersqldb.pas | 4 ++-- components/sqldbrest/reglazsqldbrest.pp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/sqldb/registersqldb.pas b/components/sqldb/registersqldb.pas index c79486a381..0a565af7e6 100644 --- a/components/sqldb/registersqldb.pas +++ b/components/sqldb/registersqldb.pas @@ -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; diff --git a/components/sqldbrest/reglazsqldbrest.pp b/components/sqldbrest/reglazsqldbrest.pp index 47834feb7a..982b1a1d9f 100644 --- a/components/sqldbrest/reglazsqldbrest.pp +++ b/components/sqldbrest/reglazsqldbrest.pp @@ -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;