Browse Source

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

git-svn-id: trunk@15665 -
michael 15 years ago
parent
commit
324fe011db

+ 2 - 2
packages/fcl-base/src/custapp.pp

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

+ 4 - 4
packages/fcl-extra/src/daemonapp.pp

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

+ 2 - 2
packages/fcl-web/src/base/custweb.pp

@@ -162,7 +162,7 @@ Type
     destructor Destroy; override;
     Procedure CreateForm(AClass : TComponentClass; out Reference);
     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 RedirectOnError : boolean Read GetRedirectOnError Write SetRedirectOnError;
@@ -573,7 +573,7 @@ begin
   Inherited;
 end;
 
-procedure TCustomWebApplication.Log(EventType: TEventType; Msg: String);
+procedure TCustomWebApplication.Log(EventType: TEventType; const Msg: String);
 begin
   EventLog.log(EventType,Msg);
 end;