mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 12:38:05 +02:00
ide: fix compilation with fpc 2.5.1
git-svn-id: trunk@21277 -
This commit is contained in:
parent
ef638bce2e
commit
e447466f59
@ -1980,7 +1980,7 @@ begin
|
||||
begin
|
||||
//MenuItem.Remove(MenuItem[index_sequence[Ind]]);
|
||||
temp_menuitem:=MenuItem[index_sequence[Ind]];
|
||||
GlobalDesignHook.DeletePersistent(temp_menuitem);
|
||||
GlobalDesignHook.DeletePersistent(TPersistent(temp_menuitem));
|
||||
//MenuItem[index_sequence[Ind]].Free;
|
||||
end else
|
||||
UpdateMenu(MenuItem.Items[index_sequence[Ind]], DesignerMenuItem, Ind + 1, TheAction)
|
||||
@ -1992,7 +1992,7 @@ begin
|
||||
for i := MenuItem[index_sequence[Ind]].Count - 1 downto 0 do
|
||||
begin
|
||||
temp_menuitem:=MenuItem[index_sequence[Ind]].Items[i];
|
||||
GlobalDesignHook.DeletePersistent(temp_menuitem);
|
||||
GlobalDesignHook.DeletePersistent(TPersistent(temp_menuitem));
|
||||
//MenuItem[index_sequence[Ind]].Delete(i);
|
||||
//MenuItem[index_sequence[Ind]].Items.Free
|
||||
end;
|
||||
|
@ -125,7 +125,7 @@ var
|
||||
ContentsDir: String;
|
||||
MacOSDir: String;
|
||||
ResourcesDir: String;
|
||||
sl: TStringList;
|
||||
sl: TStrings;
|
||||
begin
|
||||
AppBundleDir := ExtractFileNameWithoutExt(Filename) + ApplicationBundleExt + PathDelim;
|
||||
if not Recreate and DirectoryExistsUTF8(AppBundleDir) then exit(mrOk);
|
||||
|
@ -1667,7 +1667,7 @@ var
|
||||
NewUnit:=List.AddUnit('');
|
||||
end;
|
||||
//DebugLn(['AddUnits AddUnitNodes ',CurUnit.Filename]);
|
||||
AddUnitNodes(CurUnit,NewUnit);
|
||||
AddUnitNodes(CurUnit,TObject(NewUnit));
|
||||
if (DestParentList=nil) then
|
||||
DestParentList:=NewUnit;
|
||||
end;
|
||||
@ -1709,7 +1709,7 @@ var
|
||||
end;
|
||||
end;
|
||||
// create nodes for units
|
||||
AddUnits(SrcList,NewList);
|
||||
AddUnits(SrcList,TObject(NewList));
|
||||
// update DestParentList
|
||||
if (DestParentList=nil) then
|
||||
DestParentList:=NewList;
|
||||
|
@ -676,7 +676,7 @@ procedure TLazFPDocFile.SetChildValue(Node: TDOMNode; const ChildName: string;
|
||||
|
||||
procedure ReadXMLFragmentFromString(AParentNode: TDOMNode; const s: string);
|
||||
var
|
||||
MemStream: TMemoryStream;
|
||||
MemStream: TStream;
|
||||
begin
|
||||
if s='' then exit;
|
||||
try
|
||||
|
@ -346,7 +346,7 @@ function CompareDefPropCacheItems(Item1, Item2: TDefinePropertiesCacheItem): int
|
||||
function ComparePersClassNameAndDefPropCacheItem(Key: Pointer;
|
||||
Item: TDefinePropertiesCacheItem): integer;
|
||||
|
||||
function TryFreeComponent(var AComponent: TComponent): boolean;
|
||||
function TryFreeComponent(var obj): boolean;
|
||||
|
||||
procedure RegisterStandardClasses;
|
||||
|
||||
@ -393,16 +393,17 @@ begin
|
||||
RegisterClasses([TStringList]);
|
||||
end;
|
||||
|
||||
function TryFreeComponent(var AComponent: TComponent): boolean;
|
||||
function TryFreeComponent(var obj): boolean;
|
||||
var
|
||||
OldName, OldClassName: string;
|
||||
AComponent: TComponent absolute obj;
|
||||
Begin
|
||||
Result:=false;
|
||||
Result := False;
|
||||
{$IFNDEF NoCompCatch}
|
||||
try
|
||||
{$ENDIF}
|
||||
OldName:=AComponent.Name;
|
||||
OldClassName:=AComponent.ClassName;
|
||||
OldName := AComponent.Name;
|
||||
OldClassName := AComponent.ClassName;
|
||||
AComponent.Free;
|
||||
Result := True;
|
||||
{$IFNDEF NoCompCatch}
|
||||
@ -432,7 +433,7 @@ Begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
AComponent:=nil;
|
||||
AComponent := nil;
|
||||
end;
|
||||
|
||||
{ TComponentInterface }
|
||||
|
@ -45,7 +45,7 @@ uses
|
||||
{ for Get/SetForegroundWindow }
|
||||
LCLType, LCLIntf,
|
||||
SynEdit, CodeCache, CodeToolManager,
|
||||
MenuIntf, IDECommands, LazIDEIntf, ProjectIntf,
|
||||
SrcEditorIntf, MenuIntf, IDECommands, LazIDEIntf, ProjectIntf,
|
||||
LazConf,
|
||||
CompilerOptions, EditorOptions, EnvironmentOpts, ProjectOpts, KeyMapping, SourceEditor,
|
||||
ProjectDefs, Project, IDEProcs, InputHistory, Debugger, CmdLineDebugger,
|
||||
@ -2409,7 +2409,7 @@ end;
|
||||
|
||||
function TDebugManager.DoRunToCursor: TModalResult;
|
||||
var
|
||||
ActiveSrcEdit: TSourceEditor;
|
||||
ActiveSrcEdit: TSourceEditorInterface;
|
||||
ActiveUnitInfo: TUnitInfo;
|
||||
UnitFilename: string;
|
||||
begin
|
||||
@ -2446,7 +2446,7 @@ begin
|
||||
DebugLn('TDebugManager.DoRunToCursor C');
|
||||
{$endif}
|
||||
FDebugger.RunTo(ExtractFilename(UnitFilename),
|
||||
ActiveSrcEdit.EditorComponent.CaretY);
|
||||
TSourceEditor(ActiveSrcEdit).EditorComponent.CaretY);
|
||||
|
||||
{$ifdef VerboseDebugger}
|
||||
DebugLn('TDebugManager.DoRunToCursor D');
|
||||
|
@ -231,7 +231,6 @@ function ProgramDirectory: string;
|
||||
procedure RaiseException(const Msg: string);
|
||||
|
||||
// miscellaneous
|
||||
procedure FreeThenNil(var Obj: TObject);
|
||||
function CompareCaret(const FirstCaret, SecondCaret: TPoint): integer;
|
||||
function CompareBoolean(b1, b2: boolean): integer;
|
||||
procedure CheckList(List: TList; TestListNil, TestDoubles, TestNils: boolean);
|
||||
@ -1123,12 +1122,6 @@ begin
|
||||
Params:=RightStr(CmdLine,length(CmdLine)-p+1);
|
||||
end;
|
||||
|
||||
procedure FreeThenNil(var Obj: TObject);
|
||||
begin
|
||||
Obj.Free;
|
||||
Obj:=nil;
|
||||
end;
|
||||
|
||||
{-------------------------------------------------------------------------------
|
||||
function CompareCaret(const FirstCaret, SecondCaret: TPoint): integer;
|
||||
-------------------------------------------------------------------------------}
|
||||
|
@ -178,7 +178,7 @@ Lines: TStringList;
|
||||
PreList,
|
||||
AList,
|
||||
BList,
|
||||
PostList: TStringList;
|
||||
PostList: TStrings;
|
||||
Indents: PInteger;
|
||||
X, Y: Integer;
|
||||
EqPos: Integer;
|
||||
|
@ -749,7 +749,7 @@ begin
|
||||
if Assigned(OldAction) then
|
||||
begin
|
||||
try
|
||||
FDesigner.PropertyEditorHook.DeletePersistent(OldAction);
|
||||
FDesigner.PropertyEditorHook.DeletePersistent(TPersistent(OldAction));
|
||||
OldAction:=nil;
|
||||
except
|
||||
on E: Exception do begin
|
||||
|
@ -697,12 +697,12 @@ procedure TNotebookComponentEditor.DoDeletePage;
|
||||
var
|
||||
Hook: TPropertyEditorHook;
|
||||
OldIndex: integer;
|
||||
PageComponent: TComponent;
|
||||
PageComponent: TPersistent;
|
||||
begin
|
||||
OldIndex:=Notebook.PageIndex;
|
||||
if (OldIndex>=0) and (OldIndex<Notebook.PageCount) then begin
|
||||
if not GetHook(Hook) then exit;
|
||||
PageComponent:=TComponent(NoteBook.Pages.Objects[OldIndex]);
|
||||
PageComponent := TPersistent(NoteBook.Pages.Objects[OldIndex]);
|
||||
Hook.DeletePersistent(PageComponent);
|
||||
end;
|
||||
end;
|
||||
|
@ -157,7 +157,7 @@ var
|
||||
i: LongInt;
|
||||
Editor: TCompOptsExprEditor;
|
||||
begin
|
||||
SelTVNode:=GetSelectedNode(BuildProperty,NodeType);
|
||||
SelTVNode:=GetSelectedNode(TLazBuildProperty(BuildProperty),NodeType);
|
||||
if BuildProperty=nil then exit;
|
||||
if MessageDlg(lisConfirmDelete,
|
||||
Format(lisDeleteBuildMode, ['"', BuildProperty.Identifier, '"']),
|
||||
|
@ -50,7 +50,7 @@ uses
|
||||
CodeToolManager, CodeCache, NonPascalCodeTools, BasicCodeTools,
|
||||
DefineTemplates, FileProcs, AVL_Tree, Laz_XMLCfg,
|
||||
// IDE Interface
|
||||
IDEExternToolIntf, NewItemIntf, ProjectIntf, PackageIntf, MenuIntf,
|
||||
SrcEditorIntf, IDEExternToolIntf, NewItemIntf, ProjectIntf, PackageIntf, MenuIntf,
|
||||
PropEdits, IDEMsgIntf, MacroIntf, LazIDEIntf,
|
||||
// IDE
|
||||
LazConf, LazarusIDEStrConsts, IDEProcs, ObjectLists, DialogProcs, IDECommands,
|
||||
@ -692,7 +692,7 @@ end;
|
||||
|
||||
procedure TPkgManager.MainIDEitmPkgOpenPackageOfCurUnitClicked(Sender: TObject);
|
||||
var
|
||||
ActiveSourceEditor: TSourceEditor;
|
||||
ActiveSourceEditor: TSourceEditorInterface;
|
||||
ActiveUnitInfo: TUnitInfo;
|
||||
PkgFile: TPkgFile;
|
||||
Filename: String;
|
||||
@ -2850,8 +2850,8 @@ var
|
||||
|
||||
function RemoveExistingUnitnames: TModalResult;
|
||||
var
|
||||
ImplementationUsesSection: TStringList;
|
||||
MainUsesSection: TStringList;
|
||||
ImplementationUsesSection: TStrings;
|
||||
MainUsesSection: TStrings;
|
||||
j: LongInt;
|
||||
i: Integer;
|
||||
begin
|
||||
@ -3403,7 +3403,7 @@ end;
|
||||
|
||||
function TPkgManager.DoAddActiveUnitToAPackage: TModalResult;
|
||||
var
|
||||
ActiveSourceEditor: TSourceEditor;
|
||||
ActiveSourceEditor: TSourceEditorInterface;
|
||||
ActiveUnitInfo: TUnitInfo;
|
||||
PkgFile: TPkgFile;
|
||||
Filename: String;
|
||||
|
Loading…
Reference in New Issue
Block a user