IDE: checked compiler warnings, clean up

git-svn-id: trunk@48222 -
This commit is contained in:
mattias 2015-03-10 15:04:30 +00:00
parent 8f4d84fdbd
commit 21cfb7317b
4 changed files with 14 additions and 20 deletions

View File

@ -44,13 +44,14 @@ type
constructor Create(AOwner: TComponent); override; constructor Create(AOwner: TComponent); override;
end; end;
function ShowAlignComponentsDialog(var HorizAlignID, VertAlignID: integer): TModalResult; function ShowAlignComponentsDialog(out HorizAlignID, VertAlignID: integer): TModalResult;
implementation implementation
{$R *.lfm} {$R *.lfm}
function ShowAlignComponentsDialog(var HorizAlignID, VertAlignID: integer): TModalResult; function ShowAlignComponentsDialog(out HorizAlignID, VertAlignID: integer
): TModalResult;
var var
AlignComponentsDialog: TAlignComponentsDialog; AlignComponentsDialog: TAlignComponentsDialog;
begin begin

View File

@ -155,7 +155,6 @@ type
procedure SetGridColor(const AValue: TColor); procedure SetGridColor(const AValue: TColor);
procedure SetGridSizeX(const AValue: integer); procedure SetGridSizeX(const AValue: integer);
procedure SetGridSizeY(const AValue: integer); procedure SetGridSizeY(const AValue: integer);
procedure SetIsControl(Value: Boolean);
procedure SetMediator(const AValue: TDesignerMediator); procedure SetMediator(const AValue: TDesignerMediator);
procedure SetPopupMenuComponentEditor(const AValue: TBaseComponentEditor); procedure SetPopupMenuComponentEditor(const AValue: TBaseComponentEditor);
procedure SetShowBorderSpacing(const AValue: boolean); procedure SetShowBorderSpacing(const AValue: boolean);
@ -185,8 +184,8 @@ type
procedure KeyUp(Sender: TControl; var TheMessage: TLMKEY); procedure KeyUp(Sender: TControl; var TheMessage: TLMKEY);
function HandleSetCursor(var TheMessage: TLMessage): boolean; function HandleSetCursor(var TheMessage: TLMessage): boolean;
procedure HandlePopupMenu(Sender: TControl; var Message: TLMContextMenu); procedure HandlePopupMenu(Sender: TControl; var Message: TLMContextMenu);
procedure GetMouseMsgShift(TheMessage: TLMMouse; var Shift: TShiftState; procedure GetMouseMsgShift(TheMessage: TLMMouse; out Shift: TShiftState;
var Button: TMouseButton); out Button: TMouseButton);
// procedures for working with components and persistents // procedures for working with components and persistents
function GetDesignControl(AControl: TControl): TControl; function GetDesignControl(AControl: TControl): TControl;
@ -316,7 +315,7 @@ type
var TheMessage: TLMessage): Boolean; override; var TheMessage: TLMessage): Boolean; override;
function UniqueName(const BaseName: string): string; override; function UniqueName(const BaseName: string): string; override;
Procedure RemovePersistentAndChilds(APersistent: TPersistent); Procedure RemovePersistentAndChilds(APersistent: TPersistent);
procedure Notification(AComponent: TComponent; procedure Notification({%H-}AComponent: TComponent;
Operation: TOperation); override; Operation: TOperation); override;
procedure ValidateRename(AComponent: TComponent; procedure ValidateRename(AComponent: TComponent;
const CurName, NewName: string); override; const CurName, NewName: string); override;
@ -336,7 +335,7 @@ type
property GridSizeX: integer read GetGridSizeX write SetGridSizeX; property GridSizeX: integer read GetGridSizeX write SetGridSizeX;
property GridSizeY: integer read GetGridSizeY write SetGridSizeY; property GridSizeY: integer read GetGridSizeY write SetGridSizeY;
property GridColor: TColor read GetGridColor write SetGridColor; property GridColor: TColor read GetGridColor write SetGridColor;
property IsControl: Boolean read GetIsControl write SetIsControl; property IsControl: Boolean read GetIsControl;
property Mediator: TDesignerMediator read FMediator write SetMediator; property Mediator: TDesignerMediator read FMediator write SetMediator;
property ProcessingDesignerEvent: Integer read FProcessingDesignerEvent; property ProcessingDesignerEvent: Integer read FProcessingDesignerEvent;
property OnActivated: TNotifyEvent read FOnActivated write FOnActivated; property OnActivated: TNotifyEvent read FOnActivated write FOnActivated;
@ -1857,10 +1856,11 @@ begin
Message.Result := 1; Message.Result := 1;
end; end;
procedure TDesigner.GetMouseMsgShift(TheMessage: TLMMouse; procedure TDesigner.GetMouseMsgShift(TheMessage: TLMMouse; out
var Shift: TShiftState; var Button: TMouseButton); Shift: TShiftState; out Button: TMouseButton);
begin begin
Shift := []; Shift := [];
Button := mbLeft;
if (TheMessage.Keys and MK_Shift) = MK_Shift then if (TheMessage.Keys and MK_Shift) = MK_Shift then
Include(Shift, ssShift); Include(Shift, ssShift);
if (TheMessage.Keys and MK_Control) = MK_Control then if (TheMessage.Keys and MK_Control) = MK_Control then
@ -3353,11 +3353,6 @@ begin
EnvironmentOptions.GridSizeY:=AValue; EnvironmentOptions.GridSizeY:=AValue;
end; end;
procedure TDesigner.SetIsControl(Value: Boolean);
begin
end;
procedure TDesigner.SetMediator(const AValue: TDesignerMediator); procedure TDesigner.SetMediator(const AValue: TDesignerMediator);
begin begin
if Mediator=AValue then exit; if Mediator=AValue then exit;

View File

@ -46,13 +46,13 @@ type
constructor Create(AOwner: TComponent); override; constructor Create(AOwner: TComponent); override;
end; end;
function ShowScaleComponentsDialog(var ScaleInPercent: integer): TModalResult; function ShowScaleComponentsDialog(out ScaleInPercent: integer): TModalResult;
implementation implementation
{$R *.lfm} {$R *.lfm}
function ShowScaleComponentsDialog(var ScaleInPercent: integer): TModalResult; function ShowScaleComponentsDialog(out ScaleInPercent: integer): TModalResult;
var var
ScaleComponentsDialog: TScaleComponentsDialog; ScaleComponentsDialog: TScaleComponentsDialog;
begin begin

View File

@ -772,12 +772,10 @@ begin
//debugln('TComponentPalette.ComponentBtnDblClick ',TComponent(Sender).Name); //debugln('TComponentPalette.ComponentBtnDblClick ',TComponent(Sender).Name);
if SelectAButton(TComponent(Sender)) and (FSelected<>nil) then begin if SelectAButton(TComponent(Sender)) and (FSelected<>nil) then begin
if FormEditingHook<>nil then begin if FormEditingHook<>nil then begin
TypeClass:=FSelected.ComponentClass;
if assigned(FSelected.OnGetCreationClass) then if assigned(FSelected.OnGetCreationClass) then
begin
FSelected.OnGetCreationClass(Self,TypeClass); FSelected.OnGetCreationClass(Self,TypeClass);
if TypeClass=nil then exit; if TypeClass=nil then exit;
end else
TypeClass:=FSelected.ComponentClass;
ParentComp:=FormEditingHook.GetDefaultComponentParent(TypeClass); ParentComp:=FormEditingHook.GetDefaultComponentParent(TypeClass);
if ParentComp=nil then exit; if ParentComp=nil then exit;
if not FormEditingHook.GetDefaultComponentPosition(TypeClass,ParentComp,X,Y) if not FormEditingHook.GetDefaultComponentPosition(TypeClass,ParentComp,X,Y)