mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 01:49:26 +02:00
* Make paramdefs owned, so IDE can trace back changes to owning component
This commit is contained in:
parent
eae74aaee0
commit
23ac6c3090
@ -58,7 +58,7 @@ Type
|
||||
|
||||
{ TJSONParamDefs }
|
||||
|
||||
TJSONParamDefs = Class(TCollection)
|
||||
TJSONParamDefs = Class(TOwnedCollection)
|
||||
private
|
||||
function GetP(AIndex : Integer): TJSONParamDef;
|
||||
procedure SetP(AIndex : Integer; const AValue: TJSONParamDef);
|
||||
@ -884,7 +884,7 @@ end;
|
||||
function TCustomJSONRPCHandler.CreateParamDefs : TJSONParamDefs;
|
||||
|
||||
begin
|
||||
Result:=TJSONParamDefs.Create(TJSONParamDef);
|
||||
Result:=TJSONParamDefs.Create(Self,TJSONParamDef);
|
||||
end;
|
||||
|
||||
function TCustomJSONRPCHandler.Execute(Const Params: TJSONData;AContext : TJSONRPCCallContext = Nil): TJSONData;
|
||||
@ -1554,7 +1554,7 @@ end;
|
||||
function TJSONRPCHandlerDef.GetParamDefs: TJSONParamDefs;
|
||||
begin
|
||||
IF (FParamDefs=Nil) then
|
||||
FParamDefs:=TJSONParamDefs.Create(TJSONParamDef);
|
||||
FParamDefs:=TJSONParamDefs.Create(Self,TJSONParamDef);
|
||||
Result:=FParamDefs;
|
||||
end;
|
||||
|
||||
@ -1577,7 +1577,7 @@ procedure TJSONRPCHandlerDef.SetParamDefs(AValue: TJSONParamDefs);
|
||||
begin
|
||||
if FParamDefs=AValue then Exit;
|
||||
IF (FParamDefs=Nil) then
|
||||
FParamDefs:=TJSONParamDefs.Create(TJSONParamDef);
|
||||
FParamDefs:=TJSONParamDefs.Create(Self,TJSONParamDef);
|
||||
if (AValue<>Nil) then
|
||||
FParamDefs.Assign(AValue)
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user