lcl: move RegisterPropertyToSkip calls to Register* procedures or unit initialization so it's called only once and not on every component created

git-svn-id: trunk@27070 -
This commit is contained in:
blikblum 2010-08-12 12:24:11 +00:00
parent 31fc5cd0a0
commit 69b2b72516
19 changed files with 23 additions and 32 deletions

View File

@ -109,8 +109,6 @@ type
{ TCalendar }
TCalendar = class(TCustomCalendar)
protected
class procedure WSRegisterClass; override;
published
property Align;
property Anchors;
@ -331,12 +329,4 @@ begin
if Assigned(OnChange) then OnChange(self);
end;
{ TCalendar }
class procedure TCalendar.WSRegisterClass;
begin
RegisterPropertyToSkip(TCalendar, 'ReadOnly', 'Obsoleted property', '');
inherited WSRegisterClass;
end;
end.

View File

@ -3867,6 +3867,8 @@ initialization
//DebugLn('controls.pp - initialization');
RegisterPropertyToSkip(TControl, 'Ctl3D', 'VCL compatibility property', '');
RegisterPropertyToSkip(TControl, 'ParentCtl3D', 'VCL compatibility property', '');
RegisterPropertyToSkip(TControl, 'IsControl', 'VCL compatibility property', '');
RegisterPropertyToSkip(TControl, 'DesignSize', 'VCL compatibility property', '');
Mouse := TMouse.Create;
DefaultDockManagerClass := TDockTree;
DragManager := TDragManagerDefault.Create(nil);

View File

@ -243,7 +243,6 @@ end;
class procedure TCustomBitBtn.WSRegisterClass;
begin
RegisterPropertyToSkip(TBitBtn, 'Style', 'VCL compatibility property', '');
inherited WSRegisterClass;
RegisterCustomBitBtn;
end;

View File

@ -28,9 +28,6 @@ end;
class procedure TButtonControl.WSRegisterClass;
begin
RegisterPropertyToSkip(TButtonControl, 'UseOnChange',
'Removed in 0.9.27. It was an old workaround which is not needed anymore.',
'');
inherited WSRegisterClass;
RegisterButtonControl;
end;

View File

@ -79,7 +79,6 @@ end;
class procedure TCommonDialog.WSRegisterClass;
begin
RegisterPropertyToSkip(TCommonDialog, 'Ctl3D', 'VCL compatibility property', '');
inherited WSRegisterClass;
RegisterCommonDialog;
end;

View File

@ -3398,8 +3398,6 @@ end;
class procedure TControl.WSRegisterClass;
begin
inherited WSRegisterClass;
RegisterPropertyToSkip(TControl, 'IsControl', 'VCL compatibility property', '');
RegisterPropertyToSkip(TControl, 'DesignSize', 'VCL compatibility property', '');
RegisterControl;
end;

View File

@ -61,7 +61,6 @@ end;
class procedure TCustomCheckBox.WSRegisterClass;
begin
inherited WSRegisterClass;
RegisterPropertyToSkip(TCustomCheckBox, 'Alignment', 'VCL compatibility property', '');
RegisterCustomCheckBox;
end;

View File

@ -452,9 +452,6 @@ end;
class procedure TCustomComboBox.WSRegisterClass;
begin
inherited WSRegisterClass;
RegisterPropertyToSkip(TCustomComboBox, 'BevelInner', 'VCL compatibility property', '');
RegisterPropertyToSkip(TCustomComboBox, 'BevelKind', 'VCL compatibility property', '');
RegisterPropertyToSkip(TCustomComboBox, 'BevelOuter', 'VCL compatibility property', '');
RegisterCustomComboBox;
end;

View File

@ -424,7 +424,6 @@ end;
class procedure TCustomListView.WSRegisterClass;
begin
inherited WSRegisterClass;
RegisterPropertyToSkip(TListColumn, 'WidthType', 'VCL compatibility property', '');
RegisterCustomListView;
end;

View File

@ -74,9 +74,6 @@ end;
class procedure TPageControl.WSRegisterClass;
begin
inherited WSRegisterClass;
RegisterPropertyToSkip(TPageControl, 'Style', 'VCL compatibility property', '');
RegisterPropertyToSkip(TPageControl, 'HotTrack', 'VCL compatibility property', '');
RegisterPropertyToSkip(TPageControl, 'MultiLine', 'VCL compatibility property', '');
RegisterPageControl;
end;

View File

@ -94,8 +94,6 @@ class procedure TRadioButton.WSRegisterClass;
begin
inherited WSRegisterClass;
RegisterRadioButton;
RegisterPropertyToSkip(TRadioButton, 'State', 'Removed in 0.9.29. It should not be allowed to set the State directly', '');
RegisterPropertyToSkip(TRadioButton, 'AllowGrayed', 'Removed in 0.9.29. Grayed state is not supported by TRadioButton', '');
end;
function TRadioButton.DialogChar(var Message: TLMKey): boolean;

View File

@ -69,8 +69,6 @@ end;
class procedure TStatusBar.WSRegisterClass;
begin
inherited WSRegisterClass;
RegisterPropertyToSkip(TStatusBar, 'Font', 'VCL compatibility property', '');
RegisterPropertyToSkip(TStatusBar, 'UseSystemFont', 'VCL compatibility property', '');
RegisterStatusBar;
end;

View File

@ -297,7 +297,6 @@ end;
class procedure TCustomTrackBar.WSRegisterClass;
begin
inherited WSRegisterClass;
RegisterPropertyToSkip(TCustomTrackBar, 'ThumbLength', 'VCL compatibility property', '');
RegisterCustomTrackBar;
end;

View File

@ -5031,8 +5031,6 @@ end;
class procedure TCustomTreeView.WSRegisterClass;
begin
inherited WSRegisterClass;
RegisterPropertyToSkip(TCustomTreeView, 'BevelInner', 'VCL compatibility property', '');
RegisterPropertyToSkip(TCustomTreeView, 'MultiSelect', 'VCL compatibility property', '');
RegisterCustomTreeView;
end;

View File

@ -107,6 +107,7 @@ const
begin
if Done then exit;
WSRegisterCustomBitBtn;
RegisterPropertyToSkip(TBitBtn, 'Style', 'VCL compatibility property', '');
// if not WSRegisterCustomBitBtn then
// RegisterWSComponent(TCustomBitBtn, TWSBitBtn);
Done := True;

View File

@ -94,6 +94,7 @@ const
begin
if Done then exit;
WSRegisterCustomCalendar;
RegisterPropertyToSkip(TCalendar, 'ReadOnly', 'Obsoleted property', '');
// if not WSRegisterCustomCalendar then
// RegisterWSComponent(TCustomCalendar, TWSCustomCalendar);
Done := True;

View File

@ -571,6 +571,8 @@ const
begin
if Done then exit;
WSRegisterStatusBar;
RegisterPropertyToSkip(TStatusBar, 'Font', 'VCL compatibility property', '');
RegisterPropertyToSkip(TStatusBar, 'UseSystemFont', 'VCL compatibility property', '');
// if not WSRegisterStatusBar then
// RegisterWSComponent(TStatusBar, TWSStatusBar);
Done := True;
@ -593,6 +595,9 @@ const
begin
if Done then exit;
WSRegisterPageControl;
RegisterPropertyToSkip(TPageControl, 'Style', 'VCL compatibility property', '');
RegisterPropertyToSkip(TPageControl, 'HotTrack', 'VCL compatibility property', '');
RegisterPropertyToSkip(TPageControl, 'MultiLine', 'VCL compatibility property', '');
// if not WSRegisterPageControl then
// RegisterWSComponent(TPageControl, TWSPageControl);
Done := True;
@ -604,6 +609,7 @@ const
begin
if Done then exit;
WSRegisterCustomListView;
RegisterPropertyToSkip(TListColumn, 'WidthType', 'VCL compatibility property', '');
// if not WSRegisterCustomListView then
// RegisterWSComponent(TCustomListView, TWSCustomListView);
Done := True;
@ -659,6 +665,7 @@ const
begin
if Done then exit;
WSRegisterCustomTrackBar;
RegisterPropertyToSkip(TCustomTrackBar, 'ThumbLength', 'VCL compatibility property', '');
// if not WSRegisterCustomTrackBar then
// RegisterWSComponent(TCustomTrackBar, TWSCustomTrackBar);
Done := True;
@ -670,6 +677,8 @@ const
begin
if Done then exit;
WSRegisterCustomTreeView;
RegisterPropertyToSkip(TCustomTreeView, 'BevelInner', 'VCL compatibility property', '');
RegisterPropertyToSkip(TCustomTreeView, 'MultiSelect', 'VCL compatibility property', '');
// if not WSRegisterStatusBar then
// RegisterWSComponent(TCustomTreeView, TWSCustomTreeView);
Done := True;

View File

@ -136,6 +136,7 @@ begin
if Done then exit;
if not WSRegisterCommonDialog then
RegisterWSComponent(TCommonDialog, TWSCommonDialog);
RegisterPropertyToSkip(TCommonDialog, 'Ctl3D', 'VCL compatibility property', '');
Done := True;
end;

View File

@ -648,6 +648,9 @@ const
begin
if Done then exit;
WSRegisterCustomComboBox;
RegisterPropertyToSkip(TCustomComboBox, 'BevelInner', 'VCL compatibility property', '');
RegisterPropertyToSkip(TCustomComboBox, 'BevelKind', 'VCL compatibility property', '');
RegisterPropertyToSkip(TCustomComboBox, 'BevelOuter', 'VCL compatibility property', '');
// if not WSRegisterCustomComboBox then
// RegisterWSComponent(TCustomComboBox, TWSCustomComboBox);
Done := True;
@ -692,6 +695,9 @@ const
begin
if Done then exit;
WSRegisterButtonControl;
RegisterPropertyToSkip(TButtonControl, 'UseOnChange',
'Removed in 0.9.27. It was an old workaround which is not needed anymore.',
'');
// if not WSRegisterButtonControl then
// RegisterWSComponent(TButtonControl, TWSButtonControl);
Done := True;
@ -714,6 +720,7 @@ const
begin
if Done then exit;
WSRegisterCustomCheckBox;
RegisterPropertyToSkip(TCustomCheckBox, 'Alignment', 'VCL compatibility property', '');
// if not WSRegisterCustomCheckBox then
// RegisterWSComponent(TCustomCheckBox, TWSCustomCheckBox);
Done := True;
@ -736,6 +743,8 @@ const
begin
if Done then exit;
WSRegisterRadioButton;
RegisterPropertyToSkip(TRadioButton, 'State', 'Removed in 0.9.29. It should not be allowed to set the State directly', '');
RegisterPropertyToSkip(TRadioButton, 'AllowGrayed', 'Removed in 0.9.29. Grayed state is not supported by TRadioButton', '');
// if not WSRegisterRadioButton then
// RegisterWSComponent(TRadioButton, TWSRadioButton);
Done := True;