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; end;
function GetClassUnitName(Value: TClass): string; function GetClassUnitName(Value: TClass): string;
var
TheTypeInfo: PTypeInfo;
TheTypeData: PTypeData;
begin begin
Result:=''; if Value=nil then
TheTypeInfo:=ClassTypeInfo(Value); Result:=''
if TheTypeInfo=nil then exit; else
TheTypeData:=GetTypeData(TheTypeInfo); Result:=Value.UnitName;
if TheTypeData=nil then exit;
Result:=TheTypeData^.UnitName;
//debugln('GetClassUnitName A Result="',Result,'"');
end; end;
procedure CreateComponentEvent(AComponent: TComponent; const EventName: string); procedure CreateComponentEvent(AComponent: TComponent; const EventName: string);