mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 09:50:31 +02:00
lcl: add overload for TRemovedPropertyList.IndexOf
git-svn-id: trunk@17741 -
This commit is contained in:
parent
5a7173ef9a
commit
ebfa9fcc57
@ -2266,7 +2266,7 @@ procedure TCustomFormEditor.JITListPropertyNotFound(Sender: TObject;
|
|||||||
var
|
var
|
||||||
Index: Integer;
|
Index: Integer;
|
||||||
begin
|
begin
|
||||||
Index := RemovedProperties.IndexOf(TPersistentClass(Instance.ClassType), PropName);
|
Index := RemovedProperties.IndexOf(Instance, PropName);
|
||||||
if Index >= 0 then
|
if Index >= 0 then
|
||||||
begin
|
begin
|
||||||
Skip := True;
|
Skip := True;
|
||||||
|
@ -368,7 +368,8 @@ type
|
|||||||
procedure DoPropertyNotFound(Reader: TReader; Instance: TPersistent;
|
procedure DoPropertyNotFound(Reader: TReader; Instance: TPersistent;
|
||||||
var PropName: string; IsPath: boolean; var Handled, Skip: Boolean);
|
var PropName: string; IsPath: boolean; var Handled, Skip: Boolean);
|
||||||
public
|
public
|
||||||
function IndexOf(AClass: TPersistentClass; APropertyName: String): Integer;
|
function IndexOf(AInstance: TPersistent; APropertyName: String): Integer; overload;
|
||||||
|
function IndexOf(AClass: TPersistentClass; APropertyName: String): Integer; overload;
|
||||||
function Add(APersistentClass: TPersistentClass; APropertyName, ANote,
|
function Add(APersistentClass: TPersistentClass; APropertyName, ANote,
|
||||||
AHelpKeyWord: string): Integer; reintroduce;
|
AHelpKeyWord: string): Integer; reintroduce;
|
||||||
property Items[AIndex: Integer]: PRemovedProperty read GetItem write SetItem;
|
property Items[AIndex: Integer]: PRemovedProperty read GetItem write SetItem;
|
||||||
@ -569,10 +570,19 @@ end;
|
|||||||
procedure TRemovedPropertyList.DoPropertyNotFound(Reader: TReader; Instance: TPersistent;
|
procedure TRemovedPropertyList.DoPropertyNotFound(Reader: TReader; Instance: TPersistent;
|
||||||
var PropName: string; IsPath: boolean; var Handled, Skip: Boolean);
|
var PropName: string; IsPath: boolean; var Handled, Skip: Boolean);
|
||||||
begin
|
begin
|
||||||
Skip := IndexOf(TPersistentClass(Instance.ClassType), PropName) >= 0;
|
Skip := IndexOf(Instance, PropName) >= 0;
|
||||||
Handled := Skip;
|
Handled := Skip;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TRemovedPropertyList.IndexOf(AInstance: TPersistent;
|
||||||
|
APropertyName: String): Integer;
|
||||||
|
begin
|
||||||
|
if AInstance <> nil then
|
||||||
|
Result := IndexOf(TPersistentClass(AInstance.ClassType), APropertyName)
|
||||||
|
else
|
||||||
|
Result := -1;
|
||||||
|
end;
|
||||||
|
|
||||||
function TRemovedPropertyList.IndexOf(AClass: TPersistentClass;
|
function TRemovedPropertyList.IndexOf(AClass: TPersistentClass;
|
||||||
APropertyName: String): Integer;
|
APropertyName: String): Integer;
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user