mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 06:16:40 +02:00
IDE: add unit DB to uses when TBufDataset or TCSVDataset are added. Issue #29733, patch from Sven Barth
git-svn-id: trunk@65432 -
This commit is contained in:
parent
51044e806b
commit
b6a0c5b23d
@ -42,16 +42,28 @@ uses
|
|||||||
ServiceManager,
|
ServiceManager,
|
||||||
{$endif}
|
{$endif}
|
||||||
Classes, SysUtils, Process, DB, BufDataset, csvdataset, SimpleIPC, XMLConf, EventLog,
|
Classes, SysUtils, Process, DB, BufDataset, csvdataset, SimpleIPC, XMLConf, EventLog,
|
||||||
UTF8Process;
|
UTF8Process, ComponentEditors;
|
||||||
|
|
||||||
procedure RegisterFCLBaseComponents;
|
procedure RegisterFCLBaseComponents;
|
||||||
procedure RegisterLazUtilsComponents;
|
procedure RegisterLazUtilsComponents;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
type
|
||||||
|
TDatasetRequirements = class(TComponentRequirements)
|
||||||
|
procedure RequiredUnits(Units: TStrings); override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDatasetRequirements.RequiredUnits(Units: TStrings);
|
||||||
|
begin
|
||||||
|
{ the DB unit is nearly always required for working comfortably with datasets }
|
||||||
|
Units.Add('DB');
|
||||||
|
end;
|
||||||
|
|
||||||
procedure RegisterDB;
|
procedure RegisterDB;
|
||||||
begin // this bites dbflaz
|
begin // this bites dbflaz
|
||||||
RegisterComponents('Data Access',[TDatasource, TBufDataset, TCSVDataset]);
|
RegisterComponents('Data Access',[TDatasource, TBufDataset, TCSVDataset]);
|
||||||
|
RegisterComponentRequirements([TBufDataset, TCSVDataset], TDatasetRequirements);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure RegisterSimpleIPC;
|
procedure RegisterSimpleIPC;
|
||||||
|
Loading…
Reference in New Issue
Block a user