* Patch from Luiz Americo to use const string params in Log call

git-svn-id: trunk@15665 -
This commit is contained in:
michael 2010-07-30 09:26:21 +00:00
parent f4c00b4e26
commit 324fe011db
3 changed files with 8 additions and 8 deletions

View File

@ -63,7 +63,7 @@ Type
Function CheckOptions(Const ShortOptions : String; Const LongOpts : String) : String; Function CheckOptions(Const ShortOptions : String; Const LongOpts : String) : String;
Procedure GetEnvironmentList(List : TStrings;NamesOnly : Boolean); Procedure GetEnvironmentList(List : TStrings;NamesOnly : Boolean);
Procedure GetEnvironmentList(List : TStrings); Procedure GetEnvironmentList(List : TStrings);
Procedure Log(EventType : TEventType; Msg : String); virtual; Procedure Log(EventType : TEventType; const Msg : String); virtual;
// Delphi properties // Delphi properties
property ExeName: string read GetExeName; property ExeName: string read GetExeName;
property HelpFile: string read FHelpFile write FHelpFile; property HelpFile: string read FHelpFile write FHelpFile;
@ -223,7 +223,7 @@ begin
// Do nothing. Override in descendent classes. // Do nothing. Override in descendent classes.
end; end;
Procedure TCustomApplication.Log(EventType : TEventType; Msg : String); Procedure TCustomApplication.Log(EventType : TEventType; const Msg : String);
begin begin
// Do nothing. Override in descendent classes. // Do nothing. Override in descendent classes.

View File

@ -57,7 +57,7 @@ Type
Function UnInstall: boolean; virtual; Function UnInstall: boolean; virtual;
Function HandleCustomCode(ACode : DWord) : Boolean; Virtual; Function HandleCustomCode(ACode : DWord) : Boolean; Virtual;
Public Public
Procedure LogMessage(Msg : String); Procedure LogMessage(const Msg : String);
Procedure ReportStatus; Procedure ReportStatus;
// Filled in at runtime by controller // Filled in at runtime by controller
@ -370,7 +370,7 @@ Type
procedure UnInstallDaemons; procedure UnInstallDaemons;
procedure ShowHelp; procedure ShowHelp;
procedure CreateForm(InstanceClass: TComponentClass; var Reference); virtual; procedure CreateForm(InstanceClass: TComponentClass; var Reference); virtual;
procedure Log(EventType: TEventType; Msg: String); override; procedure Log(EventType: TEventType; const Msg: String); override;
Property OnRun : TNotifyEvent Read FOnRun Write FOnRun; Property OnRun : TNotifyEvent Read FOnRun Write FOnRun;
Property EventLog : TEventLog Read GetEventLog; Property EventLog : TEventLog Read GetEventLog;
Property GUIMainLoop : TGuiLoopEvent Read FGUIMainLoop Write FGuiMainLoop; Property GUIMainLoop : TGuiLoopEvent Read FGUIMainLoop Write FGuiMainLoop;
@ -652,7 +652,7 @@ end;
procedure TCustomDaemon.LogMessage(Msg: String); procedure TCustomDaemon.LogMessage(const Msg: String);
begin begin
Application.Log(etInfo,Msg); Application.Log(etInfo,Msg);
end; end;
@ -848,7 +848,7 @@ begin
end; end;
end; end;
procedure TCustomDaemonApplication.Log(EventType: TEventType; Msg: String); procedure TCustomDaemonApplication.Log(EventType: TEventType; const Msg: String);
begin begin
EventLog.Log(EventType,Msg); EventLog.Log(EventType,Msg);
end; end;

View File

@ -162,7 +162,7 @@ Type
destructor Destroy; override; destructor Destroy; override;
Procedure CreateForm(AClass : TComponentClass; out Reference); Procedure CreateForm(AClass : TComponentClass; out Reference);
Procedure Initialize; override; Procedure Initialize; override;
Procedure Log(EventType: TEventType; Msg: String); override; Procedure Log(EventType: TEventType; const Msg: String); override;
Property HandleGetOnPost : Boolean Read GetHandleGetOnPost Write SetHandleGetOnPost; Property HandleGetOnPost : Boolean Read GetHandleGetOnPost Write SetHandleGetOnPost;
Property RedirectOnError : boolean Read GetRedirectOnError Write SetRedirectOnError; Property RedirectOnError : boolean Read GetRedirectOnError Write SetRedirectOnError;
@ -573,7 +573,7 @@ begin
Inherited; Inherited;
end; end;
procedure TCustomWebApplication.Log(EventType: TEventType; Msg: String); procedure TCustomWebApplication.Log(EventType: TEventType; const Msg: String);
begin begin
EventLog.log(EventType,Msg); EventLog.log(EventType,Msg);
end; end;