mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 12:00:40 +02:00
IdeIntf: Simplify sub-functions of IsInteresting used by OI. The same value was used always for parameters.
git-svn-id: trunk@52115 -
This commit is contained in:
parent
ea6d77261a
commit
9e0eaa8431
@ -6862,7 +6862,7 @@ var
|
||||
UpperPropName: String;
|
||||
|
||||
// check set element names against AFilter
|
||||
function IsPropInSet( const ATypeInfo: PTypeInfo; AUpperNameFilter : String ) : Boolean;
|
||||
function IsPropInSet( const ATypeInfo: PTypeInfo ) : Boolean;
|
||||
var
|
||||
TypeInfo: PTypeInfo;
|
||||
TypeData: PTypeData;
|
||||
@ -6880,14 +6880,14 @@ var
|
||||
|
||||
for i:= TypeData^.MinValue to TypeData^.MaxValue do
|
||||
begin
|
||||
Result := ContainsTextUpper( GetEnumName(TypeInfo, i), AUpperNameFilter );
|
||||
Result := ContainsTextUpper( GetEnumName(TypeInfo, i), UpperPropName );
|
||||
if Result then
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
|
||||
// check class has property name
|
||||
function IsPropInClass( const ATypeInfo: PTypeInfo; AUpperNameFilter : String ) : Boolean;
|
||||
function IsPropInClass( const ATypeInfo: PTypeInfo ) : Boolean;
|
||||
var
|
||||
propInfo: PPropInfo;
|
||||
propList: PPropList;
|
||||
@ -6901,17 +6901,17 @@ var
|
||||
//if encounter a Set check its elements name.
|
||||
if (propInfo^.PropType^.Kind = tkSet) then
|
||||
begin
|
||||
Result := IsPropInSet( propInfo^.PropType, AUpperNameFilter );
|
||||
Result := IsPropInSet( propInfo^.PropType );
|
||||
if Result then break;
|
||||
end;
|
||||
// check properties of subclass recursively
|
||||
if (propInfo^.PropType^.Kind = tkClass) then
|
||||
begin
|
||||
Result := IsPropInClass( propInfo^.PropType, AUpperNameFilter );
|
||||
Result := IsPropInClass( propInfo^.PropType );
|
||||
if Result then break;
|
||||
end;
|
||||
|
||||
Result := ContainsTextUpper( propInfo^.Name, AUpperNameFilter );
|
||||
Result := ContainsTextUpper( propInfo^.Name, UpperPropName );
|
||||
if result then break;
|
||||
end;
|
||||
if Assigned(propList) then
|
||||
@ -6941,7 +6941,7 @@ var
|
||||
if (ti^.Kind = tkSet) and (A.ClassType <> TSetElementPropertyEditor) then
|
||||
begin
|
||||
Result := ContainsTextUpper(A.GetName, UpperPropName)
|
||||
or IsPropInSet(A.GetPropType, UpperPropName);
|
||||
or IsPropInSet(A.GetPropType);
|
||||
exit;
|
||||
end;
|
||||
// Check single Props
|
||||
@ -6964,7 +6964,7 @@ var
|
||||
if (UpperPropName <> '') then
|
||||
if (paSubProperties in A.GetAttributes) then
|
||||
Result := ContainsTextUpper(A.GetName, UpperPropName)
|
||||
or IsPropInClass(A.GetPropType, UpperPropName)
|
||||
or IsPropInClass(A.GetPropType)
|
||||
else
|
||||
Result := ContainsTextUpper(A.GetName, UpperPropName );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user