mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 22:58:14 +02:00
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:
parent
31fc5cd0a0
commit
69b2b72516
@ -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.
|
||||
|
@ -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);
|
||||
|
@ -243,7 +243,6 @@ end;
|
||||
|
||||
class procedure TCustomBitBtn.WSRegisterClass;
|
||||
begin
|
||||
RegisterPropertyToSkip(TBitBtn, 'Style', 'VCL compatibility property', '');
|
||||
inherited WSRegisterClass;
|
||||
RegisterCustomBitBtn;
|
||||
end;
|
||||
|
@ -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;
|
||||
|
@ -79,7 +79,6 @@ end;
|
||||
|
||||
class procedure TCommonDialog.WSRegisterClass;
|
||||
begin
|
||||
RegisterPropertyToSkip(TCommonDialog, 'Ctl3D', 'VCL compatibility property', '');
|
||||
inherited WSRegisterClass;
|
||||
RegisterCommonDialog;
|
||||
end;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -61,7 +61,6 @@ end;
|
||||
class procedure TCustomCheckBox.WSRegisterClass;
|
||||
begin
|
||||
inherited WSRegisterClass;
|
||||
RegisterPropertyToSkip(TCustomCheckBox, 'Alignment', 'VCL compatibility property', '');
|
||||
RegisterCustomCheckBox;
|
||||
end;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -424,7 +424,6 @@ end;
|
||||
class procedure TCustomListView.WSRegisterClass;
|
||||
begin
|
||||
inherited WSRegisterClass;
|
||||
RegisterPropertyToSkip(TListColumn, 'WidthType', 'VCL compatibility property', '');
|
||||
RegisterCustomListView;
|
||||
end;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -297,7 +297,6 @@ end;
|
||||
class procedure TCustomTrackBar.WSRegisterClass;
|
||||
begin
|
||||
inherited WSRegisterClass;
|
||||
RegisterPropertyToSkip(TCustomTrackBar, 'ThumbLength', 'VCL compatibility property', '');
|
||||
RegisterCustomTrackBar;
|
||||
end;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user