removed a lot of ornamental/useless <const> storage class

This commit is contained in:
Basile Burg 2014-11-11 10:15:39 +01:00
parent ec4ddf1305
commit 4e3642ec54
10 changed files with 117 additions and 115 deletions

View File

@ -37,10 +37,10 @@ type
constructor create(aOwner: TComponent); override;
destructor destroy; override;
//
procedure projNew(const aProject: TCEProject);
procedure projClosing(const aProject: TCEProject);
procedure projFocused(const aProject: TCEProject);
procedure projChanged(const aProject: TCEProject);
procedure projNew(aProject: TCEProject);
procedure projClosing(aProject: TCEProject);
procedure projFocused(aProject: TCEProject);
procedure projChanged(aProject: TCEProject);
end;
implementation
@ -72,24 +72,24 @@ end;
{$ENDREGION --------------------------------------------------------------------}
{$REGION ICEProjectMonitor -----------------------------------------------------}
procedure TCECdbWidget.projNew(const aProject: TCEProject);
procedure TCECdbWidget.projNew(aProject: TCEProject);
begin
fProject := aProject;
end;
procedure TCECdbWidget.projClosing(const aProject: TCEProject);
procedure TCECdbWidget.projClosing(aProject: TCEProject);
begin
if fProject <> aProject then
exit;
fProject := nil;
end;
procedure TCECdbWidget.projFocused(const aProject: TCEProject);
procedure TCECdbWidget.projFocused(aProject: TCEProject);
begin
fProject := aProject;
end;
procedure TCECdbWidget.projChanged(const aProject: TCEProject);
procedure TCECdbWidget.projChanged(aProject: TCEProject);
begin
end;
{$ENDREGION --------------------------------------------------------------------}

View File

@ -146,12 +146,12 @@ type
(**
* Fills aList with the names of the files located in aPath.
*)
procedure listFiles(const aList: TStrings; const aPath: string; recursive: boolean = false);
procedure listFiles(aList: TStrings; const aPath: string; recursive: boolean = false);
(**
* Fills aList with the names of the folders located in aPath.
*)
procedure listFolders(const aList: TStrings; const aPath: string);
procedure listFolders(aList: TStrings; const aPath: string);
(**
* Checks if aPath contains at least one sub-folder.
@ -161,13 +161,13 @@ type
(**
* Fills aList with the system drives.
*)
procedure listDrives(const aList: TStrings);
procedure listDrives(aList: TStrings);
(**
* If aPath ends with an asterisk then fills aList with the names of the files located in aPath.
* Returns true if aPath was 'asterisk-ifyed'.
*)
function listAsteriskPath(const aPath: string; const aList: TStrings; const someExts: TStrings = nil): boolean;
function listAsteriskPath(const aPath: string; aList: TStrings; someExts: TStrings = nil): boolean;
(**
* Lets the shell open a file
@ -182,7 +182,7 @@ type
(**
* Clears then fills aList with aProcess output stream.
*)
procedure processOutputToStrings(const aProcess: TProcess; var aList: TStringList);
procedure processOutputToStrings(aProcess: TProcess; var aList: TStringList);
(**
* Terminates and frees aProcess;
@ -192,7 +192,7 @@ type
(**
* Ensures that the in/out process pipes are not redirected, that it has a console, if it waits on exit.
*)
procedure ensureNoPipeIfWait(const aProcess: TProcess);
procedure ensureNoPipeIfWait(aProcess: TProcess);
implementation
@ -544,7 +544,7 @@ begin
(sr.Attr and faDirectory = faDirectory);
end;
procedure listFiles(const aList: TStrings; const aPath: string; recursive: boolean = false);
procedure listFiles(aList: TStrings; const aPath: string; recursive: boolean = false);
var
sr: TSearchrec;
procedure tryAdd;
@ -566,7 +566,7 @@ begin
end;
end;
procedure listFolders(const aList: TStrings; const aPath: string);
procedure listFolders(aList: TStrings; const aPath: string);
var
sr: TSearchrec;
begin
@ -600,7 +600,7 @@ begin
result := res;
end;
function listAsteriskPath(const aPath: string; const aList: TStrings; const someExts: TStrings = nil): boolean;
function listAsteriskPath(const aPath: string; aList: TStrings; someExts: TStrings = nil): boolean;
var
pth, ext, fname: string;
files: TStringList;
@ -638,7 +638,7 @@ begin
exit(false);
end;
procedure listDrives(const aList: TStrings);
procedure listDrives(aList: TStrings);
{$IFDEF WINDOWS}
var
drv: char;
@ -693,7 +693,7 @@ begin
exit(ExeSearch(anExeName, '') <> '');
end;
procedure processOutputToStrings(const aProcess: TProcess; var aList: TStringList);
procedure processOutputToStrings(aProcess: TProcess; var aList: TStringList);
var
str: TMemoryStream;
sum: Integer;
@ -729,7 +729,7 @@ begin
aProcess := nil;
end;
procedure ensureNoPipeIfWait(const aProcess: TProcess);
procedure ensureNoPipeIfWait(aProcess: TProcess);
begin
if not (poWaitonExit in aProcess.Options) then
exit;

View File

@ -56,18 +56,18 @@ type
procedure focusedEditorChanged;
function getEditorHint: string;
//
procedure docNew(const aDoc: TCESynMemo);
procedure docClosing(const aDoc: TCESynMemo);
procedure docFocused(const aDoc: TCESynMemo);
procedure docChanged(const aDoc: TCESynMemo);
procedure docNew(aDoc: TCESynMemo);
procedure docClosing(aDoc: TCESynMemo);
procedure docFocused(aDoc: TCESynMemo);
procedure docChanged(aDoc: TCESynMemo);
//
procedure projNew(const aProject: TCEProject);
procedure projClosing(const aProject: TCEProject);
procedure projFocused(const aProject: TCEProject);
procedure projChanged(const aProject: TCEProject);
procedure projNew(aProject: TCEProject);
procedure projClosing(aProject: TCEProject);
procedure projFocused(aProject: TCEProject);
procedure projChanged(aProject: TCEProject);
//
procedure projCompile(const aProject: TCEProject); //warning: removed from itf
procedure projRun(const aProject: TCEProject); //warning: removed from itf
procedure projCompile(aProject: TCEProject); //warning: removed from itf
procedure projRun(aProject: TCEProject); //warning: removed from itf
//
property editor[index: NativeInt]: TCESynMemo read getEditor;
property editorCount: NativeInt read getEditorCount;
@ -114,24 +114,24 @@ end;
{$ENDREGION}
{$REGION ICEMultiDocObserver ---------------------------------------------------}
procedure TCEEditorWidget.docNew(const aDoc: TCESynMemo);
procedure TCEEditorWidget.docNew(aDoc: TCESynMemo);
begin
fDoc := aDoc;
end;
procedure TCEEditorWidget.docClosing(const aDoc: TCESynMemo);
procedure TCEEditorWidget.docClosing(aDoc: TCESynMemo);
begin
if fDoc <> aDoc then exit;
fDoc := nil;
end;
procedure TCEEditorWidget.docFocused(const aDoc: TCESynMemo);
procedure TCEEditorWidget.docFocused(aDoc: TCESynMemo);
begin
fDoc := aDoc;
focusedEditorChanged;
end;
procedure TCEEditorWidget.docChanged(const aDoc: TCESynMemo);
procedure TCEEditorWidget.docChanged(aDoc: TCESynMemo);
begin
if fDoc <> aDoc then exit;
fKeyChanged := true;
@ -141,36 +141,36 @@ end;
{$ENDREGION}
{$REGION ICEProjectObserver ----------------------------------------------------}
procedure TCEEditorWidget.projNew(const aProject: TCEProject);
procedure TCEEditorWidget.projNew(aProject: TCEProject);
begin
fProj := aProject;
end;
procedure TCEEditorWidget.projClosing(const aProject: TCEProject);
procedure TCEEditorWidget.projClosing(aProject: TCEProject);
begin
if fProj <> aProject then
exit;
fProj := nil;
end;
procedure TCEEditorWidget.projFocused(const aProject: TCEProject);
procedure TCEEditorWidget.projFocused(aProject: TCEProject);
begin
fProj := aProject;
end;
procedure TCEEditorWidget.projChanged(const aProject: TCEProject);
procedure TCEEditorWidget.projChanged(aProject: TCEProject);
begin
if fProj <> aProject then
exit;
fProj := aProject;
end;
procedure TCEEditorWidget.projCompile(const aProject: TCEProject);
procedure TCEEditorWidget.projCompile(aProject: TCEProject);
begin
endUpdateByDelay; // warning not trigered anymore
end;
procedure TCEEditorWidget.projRun(const aProject: TCEProject);
procedure TCEEditorWidget.projRun(aProject: TCEProject);
begin
endUpdateByDelay; // warning not trigered anymore
end;

View File

@ -53,13 +53,13 @@ type
ICEMultiDocObserver = interface
['ICEMultiDocObserver']
// aDoc has been created (empty, runnable, project source, ...).
procedure docNew(const aDoc: TCESynMemo);
procedure docNew(aDoc: TCESynMemo);
// aDoc is the document being edited.
procedure docFocused(const aDoc: TCESynMemo);
procedure docFocused(aDoc: TCESynMemo);
// aDoc content has just been modified (edited, saved).
procedure docChanged(const aDoc: TCESynMemo);
procedure docChanged(aDoc: TCESynMemo);
// aDoc is about to be closed.
procedure docClosing(const aDoc: TCESynMemo);
procedure docClosing(aDoc: TCESynMemo);
end;
(**
* An implementer informs some ICEMultiDocObserver about the current file(s)
@ -77,13 +77,13 @@ type
ICEProjectObserver = interface
['ICEProjectObserver']
// aProject has been created/opened
procedure projNew(const aProject: TCEProject);
procedure projNew(aProject: TCEProject);
// aProject has been modified: switches, source name, ...
procedure projChanged(const aProject: TCEProject);
procedure projChanged(aProject: TCEProject);
// aProject is about to be closed.
procedure projClosing(const aProject: TCEProject);
procedure projClosing(aProject: TCEProject);
// not used yet: the active project is now aProject
procedure projFocused(const aProject: TCEProject);
procedure projFocused(aProject: TCEProject);
end;
(**
* An implementer informs some ICEProjectObserver about the current project(s)

View File

@ -200,10 +200,10 @@ type
fLogMessager: TCELogMessageSubject;
// ICEMultiDocObserver
procedure docNew(const aDoc: TCESynMemo);
procedure docClosing(const aDoc: TCESynMemo);
procedure docFocused(const aDoc: TCESynMemo);
procedure docChanged(const aDoc: TCESynMemo);
procedure docNew(aDoc: TCESynMemo);
procedure docClosing(aDoc: TCESynMemo);
procedure docFocused(aDoc: TCESynMemo);
procedure docChanged(aDoc: TCESynMemo);
// ICESessionOptionsObserver
procedure sesoptBeforeSave;
@ -922,23 +922,23 @@ end;
{$ENDREGION}
{$REGION ICEMultiDocMonitor ----------------------------------------------------}
procedure TCEMainForm.docNew(const aDoc: TCESynMemo);
procedure TCEMainForm.docNew(aDoc: TCESynMemo);
begin
fDoc := aDoc;
end;
procedure TCEMainForm.docClosing(const aDoc: TCESynMemo);
procedure TCEMainForm.docClosing(aDoc: TCESynMemo);
begin
if aDoc <> fDoc then exit;
fDoc := nil;
end;
procedure TCEMainForm.docFocused(const aDoc: TCESynMemo);
procedure TCEMainForm.docFocused(aDoc: TCESynMemo);
begin
fDoc := aDoc;
end;
procedure TCEMainForm.docChanged(const aDoc: TCESynMemo);
procedure TCEMainForm.docChanged(aDoc: TCESynMemo);
begin
fDoc := aDoc;
end;
@ -1275,7 +1275,7 @@ begin
try
subjLmClearByData(fLogMessager, editor);
subjLmFromString(fLogMessager, 'compiling ' + shortenPath(editor.fileName,25),
subjLmFromString(fLogMessager, 'compiling ' + shortenPath(editor.fileName, 25),
editor, amcEdit, amkInf);
if fileExists(editor.fileName) then editor.save

View File

@ -74,15 +74,15 @@ type
function contextActionCount: integer; override;
function contextAction(index: integer): TAction; override;
//
procedure projNew(const aProject: TCEProject);
procedure projClosing(const aProject: TCEProject);
procedure projFocused(const aProject: TCEProject);
procedure projChanged(const aProject: TCEProject);
procedure projNew(aProject: TCEProject);
procedure projClosing(aProject: TCEProject);
procedure projFocused(aProject: TCEProject);
procedure projChanged(aProject: TCEProject);
//
procedure docNew(const aDoc: TCESynMemo);
procedure docClosing(const aDoc: TCESynMemo);
procedure docFocused(const aDoc: TCESynMemo);
procedure docChanged(const aDoc: TCESynMemo);
procedure docNew(aDoc: TCESynMemo);
procedure docClosing(aDoc: TCESynMemo);
procedure docFocused(aDoc: TCESynMemo);
procedure docChanged(aDoc: TCESynMemo);
//
procedure lmFromString(const aValue: string; aData: Pointer; aCtxt: TCEAppMessageCtxt; aKind: TCEAppMessageKind);
procedure lmClearbyContext(aCtxt: TCEAppMessageCtxt);
@ -301,13 +301,13 @@ end;
{$ENDREGION}
{$REGION ICEProjectObserver ----------------------------------------------------}
procedure TCEMessagesWidget.projNew(const aProject: TCEProject);
procedure TCEMessagesWidget.projNew(aProject: TCEProject);
begin
fProj := aProject;
filterMessages(fCtxt);
end;
procedure TCEMessagesWidget.projClosing(const aProject: TCEProject);
procedure TCEMessagesWidget.projClosing(aProject: TCEProject);
begin
if fProj <> aProject then
exit;
@ -317,25 +317,25 @@ begin
filterMessages(fCtxt);
end;
procedure TCEMessagesWidget.projFocused(const aProject: TCEProject);
procedure TCEMessagesWidget.projFocused(aProject: TCEProject);
begin
fProj := aProject;
filterMessages(fCtxt);
end;
procedure TCEMessagesWidget.projChanged(const aProject: TCEProject);
procedure TCEMessagesWidget.projChanged(aProject: TCEProject);
begin
end;
{$ENDREGION}
{$REGION ICEMultiDocObserver ---------------------------------------------------}
procedure TCEMessagesWidget.docNew(const aDoc: TCESynMemo);
procedure TCEMessagesWidget.docNew(aDoc: TCESynMemo);
begin
fDoc := aDoc;
filterMessages(fCtxt);
end;
procedure TCEMessagesWidget.docClosing(const aDoc: TCESynMemo);
procedure TCEMessagesWidget.docClosing(aDoc: TCESynMemo);
begin
if aDoc <> fDoc then exit;
lmClearbyData(fDoc);
@ -343,13 +343,13 @@ begin
filterMessages(fCtxt);
end;
procedure TCEMessagesWidget.docFocused(const aDoc: TCESynMemo);
procedure TCEMessagesWidget.docFocused(aDoc: TCESynMemo);
begin
fDoc := aDoc;
filterMessages(fCtxt);
end;
procedure TCEMessagesWidget.docChanged(const aDoc: TCESynMemo);
procedure TCEMessagesWidget.docChanged(aDoc: TCESynMemo);
begin
fDoc := aDoc;
end;

View File

@ -36,10 +36,10 @@ type
constructor create(aOwner: TComponent); override;
destructor destroy; override;
//
procedure projNew(const aProject: TCEProject);
procedure projClosing(const aProject: TCEProject);
procedure projChanged(const aProject: TCEProject);
procedure projFocused(const aProject: TCEProject);
procedure projNew(aProject: TCEProject);
procedure projClosing(aProject: TCEProject);
procedure projChanged(aProject: TCEProject);
procedure projFocused(aProject: TCEProject);
end;
implementation
@ -61,14 +61,14 @@ begin
inherited;
end;
procedure TCEProjectConfigurationWidget.projNew(const aProject: TCEProject);
procedure TCEProjectConfigurationWidget.projNew(aProject: TCEProject);
begin
beginUpdateByEvent;
fProj := aProject;
endUpdateByEvent;
end;
procedure TCEProjectConfigurationWidget.projClosing(const aProject: TCEProject);
procedure TCEProjectConfigurationWidget.projClosing(aProject: TCEProject);
begin
if fProj <> aProject then
exit;
@ -78,7 +78,7 @@ begin
fProj := nil;
end;
procedure TCEProjectConfigurationWidget.projChanged(const aProject: TCEProject);
procedure TCEProjectConfigurationWidget.projChanged(aProject: TCEProject);
begin
if fProj <> aProject then
exit;
@ -87,7 +87,7 @@ begin
endUpdateByEvent;
end;
procedure TCEProjectConfigurationWidget.projFocused(const aProject: TCEProject);
procedure TCEProjectConfigurationWidget.projFocused(aProject: TCEProject);
begin
beginUpdateByEvent;
fProj := aProject;

View File

@ -45,10 +45,10 @@ type
constructor create(aOwner: TComponent); override;
destructor destroy; override;
//
procedure projNew(const aProject: TCEProject);
procedure projClosing(const aProject: TCEProject);
procedure projFocused(const aProject: TCEProject);
procedure projChanged(const aProject: TCEProject);
procedure projNew(aProject: TCEProject);
procedure projClosing(aProject: TCEProject);
procedure projFocused(aProject: TCEProject);
procedure projChanged(aProject: TCEProject);
//
function contextName: string; override;
function contextActionCount: integer; override;
@ -121,13 +121,13 @@ end;
{$ENDREGION}
{$REGION ICEProjectMonitor -----------------------------------------------------}
procedure TCEProjectInspectWidget.projNew(const aProject: TCEProject);
procedure TCEProjectInspectWidget.projNew(aProject: TCEProject);
begin
fProject := aProject;
UpdateByEvent;
end;
procedure TCEProjectInspectWidget.projClosing(const aProject: TCEProject);
procedure TCEProjectInspectWidget.projClosing(aProject: TCEProject);
begin
if fProject <> aProject then
exit;
@ -135,13 +135,13 @@ begin
UpdateByEvent;
end;
procedure TCEProjectInspectWidget.projFocused(const aProject: TCEProject);
procedure TCEProjectInspectWidget.projFocused(aProject: TCEProject);
begin
fProject := aProject;
UpdateByEvent;
end;
procedure TCEProjectInspectWidget.projChanged(const aProject: TCEProject);
procedure TCEProjectInspectWidget.projChanged(aProject: TCEProject);
begin
if fProject <> aProject then
exit;

View File

@ -52,10 +52,10 @@ type
constructor Create(aOwner: TComponent); override;
destructor Destroy; override;
//
procedure docNew(const aDoc: TCESynMemo);
procedure docClosing(const aDoc: TCESynMemo);
procedure docFocused(const aDoc: TCESynMemo);
procedure docChanged(const aDoc: TCESynMemo);
procedure docNew(aDoc: TCESynMemo);
procedure docClosing(aDoc: TCESynMemo);
procedure docFocused(aDoc: TCESynMemo);
procedure docChanged(aDoc: TCESynMemo);
//
function contextName: string; override;
function contextActionCount: integer; override;
@ -276,25 +276,25 @@ end;
{$ENDREGION}
{$REGION ICEMultiDocObserver ---------------------------------------------------}
procedure TCESearchWidget.docNew(const aDoc: TCESynMemo);
procedure TCESearchWidget.docNew(aDoc: TCESynMemo);
begin
fEditor := aDoc;
UpdateByEvent;
end;
procedure TCESearchWidget.docClosing(const aDoc: TCESynMemo);
procedure TCESearchWidget.docClosing(aDoc: TCESynMemo);
begin
if fEditor = aDoc then fEditor := nil;
UpdateByEvent;
end;
procedure TCESearchWidget.docFocused(const aDoc: TCESynMemo);
procedure TCESearchWidget.docFocused(aDoc: TCESynMemo);
begin
fEditor := aDoc;
UpdateByEvent;
end;
procedure TCESearchWidget.docChanged(const aDoc: TCESynMemo);
procedure TCESearchWidget.docChanged(aDoc: TCESynMemo);
begin
end;
{$ENDREGION}

View File

@ -61,19 +61,19 @@ type
constructor create(aOwner: TComponent); override;
destructor destroy; override;
//
procedure docNew(const aDoc: TCESynMemo);
procedure docClosing(const aDoc: TCESynMemo);
procedure docFocused(const aDoc: TCESynMemo);
procedure docChanged(const aDoc: TCESynMemo);
procedure docNew(aDoc: TCESynMemo);
procedure docClosing(aDoc: TCESynMemo);
procedure docFocused(aDoc: TCESynMemo);
procedure docChanged(aDoc: TCESynMemo);
//
function contextName: string; override;
function contextActionCount: integer; override;
function contextAction(index: integer): TAction; override;
//
procedure projNew(const aProject: TCEProject);
procedure projClosing(const aProject: TCEProject);
procedure projFocused(const aProject: TCEProject);
procedure projChanged(const aProject: TCEProject);
procedure projNew(aProject: TCEProject);
procedure projClosing(aProject: TCEProject);
procedure projFocused(aProject: TCEProject);
procedure projChanged(aProject: TCEProject);
//
procedure sesoptDeclareProperties(aFiler: TFiler); override;
end;
@ -230,53 +230,55 @@ end;
{$ENDREGION}
{$REGION ICEMultiDocObserver ---------------------------------------------------}
procedure TCEStaticExplorerWidget.docNew(const aDoc: TCESynMemo);
procedure TCEStaticExplorerWidget.docNew(aDoc: TCESynMemo);
begin
fDoc := aDoc;
beginUpdateByDelay;
end;
procedure TCEStaticExplorerWidget.docClosing(const aDoc: TCESynMemo);
procedure TCEStaticExplorerWidget.docClosing(aDoc: TCESynMemo);
begin
if fDoc <> aDoc then exit;
fDoc := nil;
beginUpdateByDelay;
end;
procedure TCEStaticExplorerWidget.docFocused(const aDoc: TCESynMemo);
procedure TCEStaticExplorerWidget.docFocused(aDoc: TCESynMemo);
begin
fDoc := aDoc;
if fAutoRefresh then beginUpdateByDelay
else if fRefreshOnFocus then Rescan;
end;
procedure TCEStaticExplorerWidget.docChanged(const aDoc: TCESynMemo);
procedure TCEStaticExplorerWidget.docChanged(aDoc: TCESynMemo);
begin
if fDoc <> aDoc then exit;
if fAutoRefresh then beginUpdateByDelay
else if fRefreshOnChange then Rescan;
if fAutoRefresh then
beginUpdateByDelay
else if fRefreshOnChange then
Rescan;
end;
{$ENDREGION}
{$REGION ICEProjectObserver ----------------------------------------------------}
procedure TCEStaticExplorerWidget.projNew(const aProject: TCEProject);
procedure TCEStaticExplorerWidget.projNew(aProject: TCEProject);
begin
fProj := aProject;
end;
procedure TCEStaticExplorerWidget.projClosing(const aProject: TCEProject);
procedure TCEStaticExplorerWidget.projClosing(aProject: TCEProject);
begin
if fProj <> aProject then
exit;
fProj := nil;
end;
procedure TCEStaticExplorerWidget.projFocused(const aProject: TCEProject);
procedure TCEStaticExplorerWidget.projFocused(aProject: TCEProject);
begin
fProj := aProject;
end;
procedure TCEStaticExplorerWidget.projChanged(const aProject: TCEProject);
procedure TCEStaticExplorerWidget.projChanged(aProject: TCEProject);
begin
end;
{$ENDREGION}