From 69b2b7251678ee85c075da1ff73042d7a4db4c53 Mon Sep 17 00:00:00 2001 From: blikblum Date: Thu, 12 Aug 2010 12:24:11 +0000 Subject: [PATCH] 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 - --- lcl/calendar.pp | 10 ---------- lcl/controls.pp | 2 ++ lcl/include/bitbtn.inc | 1 - lcl/include/buttoncontrol.inc | 3 --- lcl/include/commondialog.inc | 1 - lcl/include/control.inc | 2 -- lcl/include/customcheckbox.inc | 1 - lcl/include/customcombobox.inc | 3 --- lcl/include/customlistview.inc | 1 - lcl/include/pagecontrol.inc | 3 --- lcl/include/radiobutton.inc | 2 -- lcl/include/statusbar.inc | 2 -- lcl/include/trackbar.inc | 1 - lcl/include/treeview.inc | 2 -- lcl/widgetset/wsbuttons.pp | 1 + lcl/widgetset/wscalendar.pp | 1 + lcl/widgetset/wscomctrls.pp | 9 +++++++++ lcl/widgetset/wsdialogs.pp | 1 + lcl/widgetset/wsstdctrls.pp | 9 +++++++++ 19 files changed, 23 insertions(+), 32 deletions(-) diff --git a/lcl/calendar.pp b/lcl/calendar.pp index 14157762c9..b7be3158f5 100644 --- a/lcl/calendar.pp +++ b/lcl/calendar.pp @@ -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. diff --git a/lcl/controls.pp b/lcl/controls.pp index 00f42dd90e..1a2031d753 100644 --- a/lcl/controls.pp +++ b/lcl/controls.pp @@ -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); diff --git a/lcl/include/bitbtn.inc b/lcl/include/bitbtn.inc index ee36d2dfb8..b11b0a59cb 100644 --- a/lcl/include/bitbtn.inc +++ b/lcl/include/bitbtn.inc @@ -243,7 +243,6 @@ end; class procedure TCustomBitBtn.WSRegisterClass; begin - RegisterPropertyToSkip(TBitBtn, 'Style', 'VCL compatibility property', ''); inherited WSRegisterClass; RegisterCustomBitBtn; end; diff --git a/lcl/include/buttoncontrol.inc b/lcl/include/buttoncontrol.inc index b11e777284..0b8aad6b49 100644 --- a/lcl/include/buttoncontrol.inc +++ b/lcl/include/buttoncontrol.inc @@ -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; diff --git a/lcl/include/commondialog.inc b/lcl/include/commondialog.inc index b7a20231f9..b358257018 100644 --- a/lcl/include/commondialog.inc +++ b/lcl/include/commondialog.inc @@ -79,7 +79,6 @@ end; class procedure TCommonDialog.WSRegisterClass; begin - RegisterPropertyToSkip(TCommonDialog, 'Ctl3D', 'VCL compatibility property', ''); inherited WSRegisterClass; RegisterCommonDialog; end; diff --git a/lcl/include/control.inc b/lcl/include/control.inc index 78f6783d76..64d03ec3f5 100644 --- a/lcl/include/control.inc +++ b/lcl/include/control.inc @@ -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; diff --git a/lcl/include/customcheckbox.inc b/lcl/include/customcheckbox.inc index c69e687057..aad6ceb1aa 100644 --- a/lcl/include/customcheckbox.inc +++ b/lcl/include/customcheckbox.inc @@ -61,7 +61,6 @@ end; class procedure TCustomCheckBox.WSRegisterClass; begin inherited WSRegisterClass; - RegisterPropertyToSkip(TCustomCheckBox, 'Alignment', 'VCL compatibility property', ''); RegisterCustomCheckBox; end; diff --git a/lcl/include/customcombobox.inc b/lcl/include/customcombobox.inc index 3a0070db6f..3249e1c9ed 100644 --- a/lcl/include/customcombobox.inc +++ b/lcl/include/customcombobox.inc @@ -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; diff --git a/lcl/include/customlistview.inc b/lcl/include/customlistview.inc index 0ce1665ccf..abafc39284 100644 --- a/lcl/include/customlistview.inc +++ b/lcl/include/customlistview.inc @@ -424,7 +424,6 @@ end; class procedure TCustomListView.WSRegisterClass; begin inherited WSRegisterClass; - RegisterPropertyToSkip(TListColumn, 'WidthType', 'VCL compatibility property', ''); RegisterCustomListView; end; diff --git a/lcl/include/pagecontrol.inc b/lcl/include/pagecontrol.inc index 1e8bca8495..0a1fe0b04c 100644 --- a/lcl/include/pagecontrol.inc +++ b/lcl/include/pagecontrol.inc @@ -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; diff --git a/lcl/include/radiobutton.inc b/lcl/include/radiobutton.inc index 81724738fa..ea9caea339 100644 --- a/lcl/include/radiobutton.inc +++ b/lcl/include/radiobutton.inc @@ -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; diff --git a/lcl/include/statusbar.inc b/lcl/include/statusbar.inc index 6c9b775a93..fbfa396793 100644 --- a/lcl/include/statusbar.inc +++ b/lcl/include/statusbar.inc @@ -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; diff --git a/lcl/include/trackbar.inc b/lcl/include/trackbar.inc index 383e34caeb..27358491d0 100644 --- a/lcl/include/trackbar.inc +++ b/lcl/include/trackbar.inc @@ -297,7 +297,6 @@ end; class procedure TCustomTrackBar.WSRegisterClass; begin inherited WSRegisterClass; - RegisterPropertyToSkip(TCustomTrackBar, 'ThumbLength', 'VCL compatibility property', ''); RegisterCustomTrackBar; end; diff --git a/lcl/include/treeview.inc b/lcl/include/treeview.inc index 6b94f8a6d3..a6bd87bbfd 100644 --- a/lcl/include/treeview.inc +++ b/lcl/include/treeview.inc @@ -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; diff --git a/lcl/widgetset/wsbuttons.pp b/lcl/widgetset/wsbuttons.pp index 2f50ba7dd3..5d463b2eb5 100644 --- a/lcl/widgetset/wsbuttons.pp +++ b/lcl/widgetset/wsbuttons.pp @@ -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; diff --git a/lcl/widgetset/wscalendar.pp b/lcl/widgetset/wscalendar.pp index ac5e380f44..481f283ecd 100644 --- a/lcl/widgetset/wscalendar.pp +++ b/lcl/widgetset/wscalendar.pp @@ -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; diff --git a/lcl/widgetset/wscomctrls.pp b/lcl/widgetset/wscomctrls.pp index fc6f92a306..19a704618b 100644 --- a/lcl/widgetset/wscomctrls.pp +++ b/lcl/widgetset/wscomctrls.pp @@ -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; diff --git a/lcl/widgetset/wsdialogs.pp b/lcl/widgetset/wsdialogs.pp index 62b2a23280..1da49fcc8b 100644 --- a/lcl/widgetset/wsdialogs.pp +++ b/lcl/widgetset/wsdialogs.pp @@ -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; diff --git a/lcl/widgetset/wsstdctrls.pp b/lcl/widgetset/wsstdctrls.pp index 0d09bca879..106822f046 100644 --- a/lcl/widgetset/wsstdctrls.pp +++ b/lcl/widgetset/wsstdctrls.pp @@ -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;