lcl: move RegisterPropertyToSkip calls of Grids and DBCtrls to unit initialization so it's called only once and not on every component created

git-svn-id: trunk@27074 -
This commit is contained in:
blikblum 2010-08-12 12:55:04 +00:00
parent bbfbce8fdd
commit 706b7cc905
6 changed files with 9 additions and 41 deletions

View File

@ -285,7 +285,6 @@ Type
procedure Loaded; override;
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
class procedure WSRegisterClass; override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
@ -383,7 +382,6 @@ Type
protected
procedure DataChange(Sender: TObject); override;
procedure UpdateData(Sender: TObject); override;
class procedure WSRegisterClass; override;
public
// we need to overrride the write method for db aware.
// the Read isn't an issue since the list will be updated
@ -847,7 +845,6 @@ Type
procedure Change; override;
procedure KeyPress(var Key:Char); override;
procedure WndProc(var AMessage : TLMessage); override;
class procedure WSRegisterClass; override;
public
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
@ -978,7 +975,6 @@ Type
procedure PictureChanged(Sender: TObject); override;
procedure LoadPicture; virtual;
procedure Loaded; override;
class procedure WSRegisterClass; override;
public
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
@ -1695,6 +1691,10 @@ end;
initialization
RegisterPropertyToSkip(TDBImage, 'Picture', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
RegisterPropertyToSkip(TDBListBox, 'Items', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
RegisterPropertyToSkip(TDBMemo, 'Lines', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
RegisterPropertyToSkip(TDBText, 'Caption', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
{$I lcl_dbnav_images.lrs}
finalization

View File

@ -1481,8 +1481,6 @@ type
{ TStringGrid }
TStringGrid = class(TCustomStringGrid)
protected
class procedure WSRegisterClass; override;
public
property Modified;
published
@ -10982,15 +10980,9 @@ begin
FEditors[i].ActiveControl:=ActiveCtrl;
end;
{ TStringGrid }
class procedure TStringGrid.WSRegisterClass;
begin
RegisterPropertyToSkip(Self, 'VisibleRowCount',
'Property streamed in by older compliler', '');
RegisterPropertyToSkip(Self, 'VisibleColCount',
'Property streamed in by older compliler', '');
inherited WSRegisterClass;
end;
initialization
RegisterPropertyToSkip(TStringGrid, 'VisibleRowCount',
'Property streamed in by older compiler', '');
RegisterPropertyToSkip(TStringGrid, 'VisibleColCount',
'Property streamed in by older compiler', '');
end.

View File

@ -193,12 +193,6 @@ begin
DataChange(Self);
end;
class procedure TDBImage.WSRegisterClass;
begin
inherited WSRegisterClass;
RegisterPropertyToSkip(TDBImage, 'Picture', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
end;
constructor TDBImage.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);

View File

@ -41,9 +41,3 @@ begin
FDataLink.Field.AsString := '';
end;
class procedure TDBListBox.WSRegisterClass;
begin
inherited WSRegisterClass;
RegisterPropertyToSkip(TDBListBox, 'Items', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
end;

View File

@ -215,12 +215,6 @@ begin
inherited WndProc(AMessage);
end;
class procedure TDBMemo.WSRegisterClass;
begin
inherited WSRegisterClass;
RegisterPropertyToSkip(TDBMemo, 'Lines', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
end;
destructor TDBMemo.Destroy;
begin
FDataLink.Free;

View File

@ -91,12 +91,6 @@ begin
end;
end;
class procedure TDBText.WSRegisterClass;
begin
inherited WSRegisterClass;
RegisterPropertyToSkip(TDBText, 'Caption', 'Removed in 0.9.29. DB control should not save/load their data from stream.', '');
end;
{ Public Methods}
constructor TDBText.Create(AOwner: TComponent);
begin