From f4900d9e5111d006690bef647cc1a1e7b94d5535 Mon Sep 17 00:00:00 2001 From: jesus Date: Tue, 2 Feb 2016 06:19:08 +0000 Subject: [PATCH] IDE, fix compiling and some corruption on logging when VerboseMenuIntf directive is enabled git-svn-id: trunk@51475 - --- components/ideintf/menuintf.pas | 8 ++++++-- designer/designer.pp | 2 +- ide/sourceeditor.pp | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/components/ideintf/menuintf.pas b/components/ideintf/menuintf.pas index 1aac858f68..7944f3fda4 100644 --- a/components/ideintf/menuintf.pas +++ b/components/ideintf/menuintf.pas @@ -1313,7 +1313,10 @@ begin FreeSeparators; - for i:=FItems.Count-1 downto 0 do TObject(FItems[i]).Free; + for i:=FItems.Count-1 downto 0 do begin + TObject(FItems[i]).Free; + FItems[i] := nil; + end; FItems.Clear; FChildMenuItemsCreated:=false; FVisibleCount:=0; @@ -1502,7 +1505,8 @@ begin ' ContainerIndex=',GetContainerIndex(false), ' NeedSep:Top=',NeedTopSeparator,',Bottom=',NeedBottomSeparator, ' Size=',dbgs(Size)]); - for i:=0 to Count-1 do Items[i].WriteDebugReport(Prefix+' ',false); + for i:=0 to Count-1 do + if Items[i]<>nil then Items[i].WriteDebugReport(Prefix+' ',false); if MenuItemDebugReport and (MenuItem<>nil) then MenuItem.WriteDebugReport(Prefix); end; diff --git a/designer/designer.pp b/designer/designer.pp index 632a09808a..d363facf67 100644 --- a/designer/designer.pp +++ b/designer/designer.pp @@ -3850,7 +3850,7 @@ begin // assign the root TMenuItem to the registered menu root. // This will automatically create all registered items {$IFDEF VerboseMenuIntf} - DesignerPopupMenu.Items.WriteDebugReport('TSourceNotebook.BuildPopupMenu '); + FDesignerPopupMenu.Items.WriteDebugReport('TSourceNotebook.BuildPopupMenu '); DesignerMenuRoot.ConsistencyCheck; {$ENDIF} DesignerMenuRoot.MenuItem := FDesignerPopupMenu.Items; diff --git a/ide/sourceeditor.pp b/ide/sourceeditor.pp index 31459dba83..733279da1d 100644 --- a/ide/sourceeditor.pp +++ b/ide/sourceeditor.pp @@ -7041,7 +7041,7 @@ procedure TSourceNotebook.RemoveContextMenuItems; begin SrcEditMenuSectionFileDynamic.Clear; {$IFDEF VerboseMenuIntf} - SrcEditMenuSectionFileDynamic.WriteDebugReport('TSourceNotebook.RemoveContextMenuItems '); + SrcEditMenuSectionFileDynamic.WriteDebugReport('TSourceNotebook.RemoveContextMenuItems ', true); {$ENDIF} end;