mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 16:00:16 +02:00
lcl: reduce amount of hints and warnings from fpc
git-svn-id: trunk@13335 -
This commit is contained in:
parent
b53639f2f0
commit
2611c3b386
@ -596,12 +596,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomListView.FinalizeWnd;
|
procedure TCustomListView.FinalizeWnd;
|
||||||
var
|
|
||||||
LVC: TWSCustomListViewClass;
|
|
||||||
begin
|
begin
|
||||||
LVC := TWSCustomListViewClass(WidgetSetClass);
|
|
||||||
// store origin
|
// store origin
|
||||||
FViewOriginCache := LVC.GetViewOrigin(Self);
|
FViewOriginCache := TWSCustomListViewClass(WidgetSetClass).GetViewOrigin(Self);
|
||||||
inherited FinalizeWnd;
|
inherited FinalizeWnd;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -61,7 +61,6 @@ var
|
|||||||
idx: Integer;
|
idx: Integer;
|
||||||
UpdAllowed: Boolean;
|
UpdAllowed: Boolean;
|
||||||
LV: TCustomListView;
|
LV: TCustomListView;
|
||||||
WSC: TWSCustomListViewClass;
|
|
||||||
begin
|
begin
|
||||||
idx := Index;
|
idx := Index;
|
||||||
UpdAllowed := WSUpdateAllowed;
|
UpdAllowed := WSUpdateAllowed;
|
||||||
@ -79,8 +78,7 @@ begin
|
|||||||
if not UpdAllowed then Exit;
|
if not UpdAllowed then Exit;
|
||||||
|
|
||||||
LV := Columns.FOwner;
|
LV := Columns.FOwner;
|
||||||
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
|
TWSCustomListViewClass(LV.WidgetSetClass).ColumnDelete(LV, Idx);
|
||||||
WSC.ColumnDelete(LV, Idx);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TListColumn.WSCreateColumn;
|
procedure TListColumn.WSCreateColumn;
|
||||||
@ -104,11 +102,9 @@ end;
|
|||||||
procedure TListColumn.WSDestroyColumn;
|
procedure TListColumn.WSDestroyColumn;
|
||||||
var
|
var
|
||||||
LV: TCustomListView;
|
LV: TCustomListView;
|
||||||
WSC: TWSCustomListViewClass;
|
|
||||||
begin
|
begin
|
||||||
LV := TListColumns(Collection).FOwner;
|
LV := TListColumns(Collection).FOwner;
|
||||||
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
|
TWSCustomListViewClass(LV.WidgetSetClass).ColumnDelete(LV, Index);
|
||||||
WSC.ColumnDelete(LV, Index);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TListColumn.WSUpdateAllowed: Boolean;
|
function TListColumn.WSUpdateAllowed: Boolean;
|
||||||
@ -123,14 +119,12 @@ end;
|
|||||||
function TListColumn.GetWidth: TWidth;
|
function TListColumn.GetWidth: TWidth;
|
||||||
var
|
var
|
||||||
LV: TCustomListView;
|
LV: TCustomListView;
|
||||||
WSC: TWSCustomListViewClass;
|
|
||||||
WSWidth: integer;
|
WSWidth: integer;
|
||||||
begin
|
begin
|
||||||
if WSUpdateAllowed
|
if WSUpdateAllowed
|
||||||
then begin
|
then begin
|
||||||
LV := TListColumns(Collection).FOwner;
|
LV := TListColumns(Collection).FOwner;
|
||||||
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
|
WSWidth := TWSCustomListViewClass(LV.WidgetSetClass).ColumnGetWidth(LV, Index, Self);
|
||||||
WSWidth := WSC.ColumnGetWidth(LV, Index, Self);
|
|
||||||
if WSWidth < 0
|
if WSWidth < 0
|
||||||
then Result := FWidth
|
then Result := FWidth
|
||||||
else Result := WSWidth;
|
else Result := WSWidth;
|
||||||
@ -141,7 +135,6 @@ end;
|
|||||||
procedure TListColumn.SetAlignment(const AValue: TAlignment);
|
procedure TListColumn.SetAlignment(const AValue: TAlignment);
|
||||||
var
|
var
|
||||||
LV: TCustomListView;
|
LV: TCustomListView;
|
||||||
WSC: TWSCustomListViewClass;
|
|
||||||
begin
|
begin
|
||||||
if FAlignment = AValue then Exit;
|
if FAlignment = AValue then Exit;
|
||||||
FAlignment := AValue;
|
FAlignment := AValue;
|
||||||
@ -149,14 +142,12 @@ begin
|
|||||||
if not WSUpdateAllowed then Exit;
|
if not WSUpdateAllowed then Exit;
|
||||||
|
|
||||||
LV := TListColumns(Collection).FOwner;
|
LV := TListColumns(Collection).FOwner;
|
||||||
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
|
TWSCustomListViewClass(LV.WidgetSetClass).ColumnSetAlignment(LV, Index, Self, FAlignment);
|
||||||
WSC.ColumnSetAlignment(LV, Index, Self, FAlignment);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TListColumn.SetCaption(const AValue: TTranslateString);
|
procedure TListColumn.SetCaption(const AValue: TTranslateString);
|
||||||
var
|
var
|
||||||
LV: TCustomListView;
|
LV: TCustomListView;
|
||||||
WSC: TWSCustomListViewClass;
|
|
||||||
begin
|
begin
|
||||||
if AValue = FCaption then Exit;
|
if AValue = FCaption then Exit;
|
||||||
FCaption := AValue;
|
FCaption := AValue;
|
||||||
@ -164,14 +155,12 @@ begin
|
|||||||
if not WSUpdateAllowed then Exit;
|
if not WSUpdateAllowed then Exit;
|
||||||
|
|
||||||
LV := TListColumns(Collection).FOwner;
|
LV := TListColumns(Collection).FOwner;
|
||||||
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
|
TWSCustomListViewClass(LV.WidgetSetClass).ColumnSetCaption(LV, Index, Self, FCaption);
|
||||||
WSC.ColumnSetCaption(LV, Index, Self, FCaption);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TListColumn.SetWidth(const AValue: TWidth);
|
procedure TListColumn.SetWidth(const AValue: TWidth);
|
||||||
var
|
var
|
||||||
LV: TCustomListView;
|
LV: TCustomListView;
|
||||||
WSC: TWSCustomListViewClass;
|
|
||||||
begin
|
begin
|
||||||
if FWidth = AValue then Exit;
|
if FWidth = AValue then Exit;
|
||||||
FWidth := AValue;
|
FWidth := AValue;
|
||||||
@ -179,14 +168,12 @@ begin
|
|||||||
if not WSUpdateAllowed then Exit;
|
if not WSUpdateAllowed then Exit;
|
||||||
|
|
||||||
LV := TListColumns(Collection).FOwner;
|
LV := TListColumns(Collection).FOwner;
|
||||||
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
|
TWSCustomListViewClass(LV.WidgetSetClass).ColumnSetWidth(LV, Index, Self, FWidth);
|
||||||
WSC.ColumnSetWidth(LV, Index, Self, FWidth);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TListColumn.SetMaxWidth(const AValue: TWidth);
|
procedure TListColumn.SetMaxWidth(const AValue: TWidth);
|
||||||
var
|
var
|
||||||
LV: TCustomListView;
|
LV: TCustomListView;
|
||||||
WSC: TWSCustomListViewClass;
|
|
||||||
begin
|
begin
|
||||||
if FMaxWidth = AValue then Exit;
|
if FMaxWidth = AValue then Exit;
|
||||||
FMaxWidth := AValue;
|
FMaxWidth := AValue;
|
||||||
@ -194,14 +181,12 @@ begin
|
|||||||
if not WSUpdateAllowed then Exit;
|
if not WSUpdateAllowed then Exit;
|
||||||
|
|
||||||
LV := TListColumns(Collection).FOwner;
|
LV := TListColumns(Collection).FOwner;
|
||||||
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
|
TWSCustomListViewClass(LV.WidgetSetClass).ColumnSetMaxWidth(LV, Index, Self, FMaxWidth);
|
||||||
WSC.ColumnSetMaxWidth(LV, Index, Self, FMaxWidth);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TListColumn.SetMinWidth(const AValue: TWidth);
|
procedure TListColumn.SetMinWidth(const AValue: TWidth);
|
||||||
var
|
var
|
||||||
LV: TCustomListView;
|
LV: TCustomListView;
|
||||||
WSC: TWSCustomListViewClass;
|
|
||||||
begin
|
begin
|
||||||
if FMinWidth = AValue then Exit;
|
if FMinWidth = AValue then Exit;
|
||||||
FMinWidth := AValue;
|
FMinWidth := AValue;
|
||||||
@ -209,14 +194,12 @@ begin
|
|||||||
if not WSUpdateAllowed then Exit;
|
if not WSUpdateAllowed then Exit;
|
||||||
|
|
||||||
LV := TListColumns(Collection).FOwner;
|
LV := TListColumns(Collection).FOwner;
|
||||||
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
|
TWSCustomListViewClass(LV.WidgetSetClass).ColumnSetMinWidth(LV, Index, Self, FMinWidth);
|
||||||
WSC.ColumnSetMinWidth(LV, Index, Self, FMinWidth);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TListColumn.SetAutoSize(const AValue: Boolean);
|
procedure TListColumn.SetAutoSize(const AValue: Boolean);
|
||||||
var
|
var
|
||||||
LV: TCustomListView;
|
LV: TCustomListView;
|
||||||
WSC: TWSCustomListViewClass;
|
|
||||||
begin
|
begin
|
||||||
if FAutoSize = AValue then Exit;
|
if FAutoSize = AValue then Exit;
|
||||||
FAutoSize := AValue;
|
FAutoSize := AValue;
|
||||||
@ -224,14 +207,12 @@ begin
|
|||||||
if not WSUpdateAllowed then Exit;
|
if not WSUpdateAllowed then Exit;
|
||||||
|
|
||||||
LV := TListColumns(Collection).FOwner;
|
LV := TListColumns(Collection).FOwner;
|
||||||
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
|
TWSCustomListViewClass(LV.WidgetSetClass).ColumnSetAutosize(LV, Index, Self, FAutosize);
|
||||||
WSC.ColumnSetAutosize(LV, Index, Self, FAutosize);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TListColumn.SetImageIndex(const AValue: TImageIndex);
|
procedure TListColumn.SetImageIndex(const AValue: TImageIndex);
|
||||||
var
|
var
|
||||||
LV: TCustomListView;
|
LV: TCustomListView;
|
||||||
WSC: TWSCustomListViewClass;
|
|
||||||
begin
|
begin
|
||||||
if FImageIndex = AValue then Exit;
|
if FImageIndex = AValue then Exit;
|
||||||
FImageIndex := AValue;
|
FImageIndex := AValue;
|
||||||
@ -239,16 +220,14 @@ begin
|
|||||||
if not WSUpdateAllowed then Exit;
|
if not WSUpdateAllowed then Exit;
|
||||||
|
|
||||||
LV := TListColumns(Collection).FOwner;
|
LV := TListColumns(Collection).FOwner;
|
||||||
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
|
TWSCustomListViewClass(LV.WidgetSetClass).ColumnSetImage(LV, Index, Self, FImageIndex);
|
||||||
WSC.ColumnSetImage(LV, Index, Self, FImageIndex);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TListColumn.SetIndex(AValue: Integer);
|
procedure TListColumn.SetIndex(AValue: Integer);
|
||||||
var
|
var
|
||||||
OldIndex: Integer;
|
OldIndex: Integer;
|
||||||
LV: TCustomListView;
|
LV: TCustomListView;
|
||||||
WSC: TWSCustomListViewClass;
|
begin
|
||||||
begin
|
|
||||||
OldIndex := Index;
|
OldIndex := Index;
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
@ -256,8 +235,7 @@ begin
|
|||||||
if not WSUpdateAllowed then Exit;
|
if not WSUpdateAllowed then Exit;
|
||||||
|
|
||||||
LV := TListColumns(Collection).FOwner;
|
LV := TListColumns(Collection).FOwner;
|
||||||
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
|
TWSCustomListViewClass(LV.WidgetSetClass).ColumnMove(LV, OldIndex, Index, Self);
|
||||||
WSC.ColumnMove(LV, OldIndex, Index, Self);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TListColumn.GetDisplayName: string;
|
function TListColumn.GetDisplayName: string;
|
||||||
@ -269,7 +247,6 @@ end;
|
|||||||
procedure TListColumn.SetVisible(const AValue: Boolean);
|
procedure TListColumn.SetVisible(const AValue: Boolean);
|
||||||
var
|
var
|
||||||
LV: TCustomListView;
|
LV: TCustomListView;
|
||||||
WSC: TWSCustomListViewClass;
|
|
||||||
begin
|
begin
|
||||||
if FVisible = AValue then Exit;
|
if FVisible = AValue then Exit;
|
||||||
FVisible := AValue;
|
FVisible := AValue;
|
||||||
@ -277,7 +254,6 @@ begin
|
|||||||
if not WSUpdateAllowed then Exit;
|
if not WSUpdateAllowed then Exit;
|
||||||
|
|
||||||
LV := TListColumns(Collection).FOwner;
|
LV := TListColumns(Collection).FOwner;
|
||||||
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
|
TWSCustomListViewClass(LV.WidgetSetClass).ColumnSetVisible(LV, Index, Self, FVisible);
|
||||||
WSC.ColumnSetVisible(LV, Index, Self, FVisible);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -432,13 +432,10 @@ procedure TListItem.WSUpdateChecked;
|
|||||||
var
|
var
|
||||||
LV: TCustomListView;
|
LV: TCustomListView;
|
||||||
Idx: Integer;
|
Idx: Integer;
|
||||||
WSC: TWSCustomListViewClass;
|
|
||||||
begin
|
begin
|
||||||
LV := FOwner.FOwner;
|
LV := FOwner.FOwner;
|
||||||
WSC := TWSCustomListViewClass(LV.WidgetSetClass);
|
|
||||||
idx := GetIndex;
|
idx := GetIndex;
|
||||||
|
TWSCustomListViewClass(LV.WidgetSetClass).ItemSetChecked(LV, idx, Self, FChecked);
|
||||||
WSC.ItemSetChecked(LV, idx, Self, FChecked);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
|
@ -9051,7 +9051,7 @@ begin
|
|||||||
and (not AWinControl.Font.IsDefault)
|
and (not AWinControl.Font.IsDefault)
|
||||||
then begin
|
then begin
|
||||||
// allocate font (just read it)
|
// allocate font (just read it)
|
||||||
if AWinControl.Font.Handle=0 then ;
|
if AWinControl.Font.Reference.Handle=0 then ;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
|
@ -620,7 +620,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
UseFont := PGdiObject(AFont.Handle)^.GDIFontObject;
|
UseFont := PGdiObject(AFont.Reference.Handle)^.GDIFontObject;
|
||||||
FontDesc := pango_layout_get_font_description(UseFont);
|
FontDesc := pango_layout_get_font_description(UseFont);
|
||||||
gtk_widget_modify_font(AWidget, FontDesc);
|
gtk_widget_modify_font(AWidget, FontDesc);
|
||||||
end;
|
end;
|
||||||
|
@ -1368,7 +1368,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Windows.SetTextColor(WindowDC, Windows.COLORREF(ColorToRGB(ChildWinControl.Font.Color)));
|
Windows.SetTextColor(WindowDC, Windows.COLORREF(ColorToRGB(ChildWinControl.Font.Color)));
|
||||||
Windows.SetBkColor(WindowDC, Windows.COLORREF(ColorToRGB(ChildWinControl.Brush.Color)));
|
Windows.SetBkColor(WindowDC, Windows.COLORREF(ColorToRGB(ChildWinControl.Brush.Color)));
|
||||||
LMessage.Result := LResult(ChildWinControl.Brush.Handle);
|
LMessage.Result := LResult(ChildWinControl.Brush.Reference.Handle);
|
||||||
//DebugLn(['WindowProc ', ChildWinControl.Name, ' Brush: ', LMessage.Result]);
|
//DebugLn(['WindowProc ', ChildWinControl.Name, ' Brush: ', LMessage.Result]);
|
||||||
// Override default handling
|
// Override default handling
|
||||||
WinProcess := false;
|
WinProcess := false;
|
||||||
|
Loading…
Reference in New Issue
Block a user