IDEIntf: simplification

git-svn-id: trunk@38033 -
This commit is contained in:
mattias 2012-07-24 16:57:47 +00:00
parent e2a4592001
commit 51d31bea71

View File

@ -6079,17 +6079,11 @@ begin
end;
function GetClassUnitName(Value: TClass): string;
var
TheTypeInfo: PTypeInfo;
TheTypeData: PTypeData;
begin
Result:='';
TheTypeInfo:=ClassTypeInfo(Value);
if TheTypeInfo=nil then exit;
TheTypeData:=GetTypeData(TheTypeInfo);
if TheTypeData=nil then exit;
Result:=TheTypeData^.UnitName;
//debugln('GetClassUnitName A Result="',Result,'"');
if Value=nil then
Result:=''
else
Result:=Value.UnitName;
end;
procedure CreateComponentEvent(AComponent: TComponent; const EventName: string);