Ver código fonte

* Moved TEventType from eventlog.pp tot sysutils
* Added empty TCustomApplication.Log method

git-svn-id: trunk@14960 -

joost 15 anos atrás
pai
commit
151fab0548

+ 7 - 0
packages/fcl-base/src/custapp.pp

@@ -63,6 +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;
     // Delphi properties
     property ExeName: string read GetExeName;
     property HelpFile: string read FHelpFile write FHelpFile;
@@ -222,6 +223,12 @@ begin
   // Do nothing. Override in descendent classes.
 end;
 
+Procedure TCustomApplication.Log(EventType : TEventType; Msg : String);
+
+begin
+  // Do nothing. Override in descendent classes.
+end;
+
 constructor TCustomApplication.Create(AOwner: TComponent);
 begin
   inherited Create(AOwner);

+ 0 - 1
packages/fcl-base/src/eventlog.pp

@@ -23,7 +23,6 @@ uses SysUtils,Classes;
 
 Type
   TEventLog = Class;
-  TEventType = (etCustom,etInfo,etWarning,etError,etDebug);
   TLogType = (ltSystem,ltFile);
   TLogCodeEvent = Procedure (Sender : TObject; Var Code : DWord) of Object;
   TLogCategoryEvent = Procedure (Sender : TObject; Var Code : Word) of Object;

+ 3 - 0
rtl/objpas/sysutils/osutilsh.inc

@@ -52,6 +52,9 @@ Type
   TGetTempDirEvent  = Function (Global : Boolean) : String;
   TGetTempFileEvent = Function (Const Dir,Prefix : String) : String;
 
+Type
+  TEventType = (etCustom,etInfo,etWarning,etError,etDebug);
+
 Var
   OnGetVendorName      : TGetVendorNameEvent;
   OnGetApplicationName : TGetAppNameEvent;