From fb380a80d41ebf2289f44acd90b34c1e7e96bcb4 Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 28 Nov 2008 02:53:56 +0000 Subject: [PATCH] ide, codetools, ideintf: fix warnings git-svn-id: trunk@17616 - --- components/codetools/finddeclarationtool.pas | 2 +- components/codetools/laz_xmlstreaming.pas | 11 ++++ ide/sourceeditprocs.pas | 2 +- ideintf/componenttreeview.pas | 2 +- ideintf/objectinspector.lfm | 54 -------------------- ideintf/objectinspector.lrs | 44 +++++----------- ideintf/objectinspector.pp | 4 +- lcl/controls.pp | 2 +- lcl/translations.pas | 1 + 9 files changed, 30 insertions(+), 92 deletions(-) diff --git a/components/codetools/finddeclarationtool.pas b/components/codetools/finddeclarationtool.pas index 1b7596cf74..3a3640ea57 100644 --- a/components/codetools/finddeclarationtool.pas +++ b/components/codetools/finddeclarationtool.pas @@ -592,7 +592,6 @@ type Params: TFindDeclarationParams): boolean; protected WordIsPredefinedIdentifier: TKeyWordFunctionList; - procedure BeginParsing(DeleteNodes, OnlyInterfaceNeeded: boolean); override; protected // node caches procedure DoDeleteNodes; override; @@ -697,6 +696,7 @@ type destructor Destroy; override; procedure ConsistencyCheck; override; + procedure BeginParsing(DeleteNodes, OnlyInterfaceNeeded: boolean); override; procedure ValidateToolDependencies; override; function FindDeclaration(const CursorPos: TCodeXYPosition; out NewPos: TCodeXYPosition; out NewTopLine: integer): boolean; diff --git a/components/codetools/laz_xmlstreaming.pas b/components/codetools/laz_xmlstreaming.pas index b02ab7c6d8..a69ac1aa3b 100644 --- a/components/codetools/laz_xmlstreaming.pas +++ b/components/codetools/laz_xmlstreaming.pas @@ -82,6 +82,9 @@ type procedure WriteSet(Value: LongInt; SetType: Pointer); override; procedure WriteString(const Value: String); override; procedure WriteWideString(const Value: WideString); override; + {$IF DECLARED(UnicodeString)} + procedure WriteUnicodeString(const Value: UnicodeString); override; + {$IFEND} {$IFDEF HasReadWriteBuf} procedure Write(const Buffer; Count: Longint); override; {$ENDIF} @@ -452,6 +455,14 @@ begin GetPropertyElement('widestring')['value'] := System.UTF8Encode(Value); end; +{$IF DECLARED(UnicodeString)} +procedure TXMLObjectWriter.WriteUnicodeString(const Value: UnicodeString); +// save unicodestrings as utf8 +begin + GetPropertyElement('unicodestring')['value'] := System.UTF8Encode(Value); +end; +{$endif} + {$IFDEF HasReadWriteBuf} procedure TXMLObjectWriter.Write(const Buffer; Count: Longint); begin diff --git a/ide/sourceeditprocs.pas b/ide/sourceeditprocs.pas index 464c3cd8ea..cb3f467be4 100644 --- a/ide/sourceeditprocs.pas +++ b/ide/sourceeditprocs.pas @@ -46,7 +46,7 @@ type { TLazTextConverterToolClasses } TLazTextConverterToolClasses = class(TTextConverterToolClasses) - protected + public function GetTempFilename: string; override; function SupportsType(aTextType: TTextConverterType): boolean; override; function LoadFromFile(Converter: TIDETextConverter; const AFilename: string; diff --git a/ideintf/componenttreeview.pas b/ideintf/componenttreeview.pas index 7d7a4fd865..95b334b9ab 100644 --- a/ideintf/componenttreeview.pas +++ b/ideintf/componenttreeview.pas @@ -45,12 +45,12 @@ type protected procedure DoSelectionChanged; override; function GetImageFor(AComponent: TComponent):integer; - procedure DragDrop(Source: TObject; X,Y: Integer); override; procedure DragOver(Source: TObject; X,Y: Integer; State: TDragState; var Accept: Boolean); override; public constructor Create(TheOwner: TComponent); override; destructor Destroy; override; + procedure DragDrop(Source: TObject; X,Y: Integer); override; procedure RebuildComponentNodes; virtual; procedure UpdateComponentNodesValues; virtual; function CreateNodeCaption(APersistent: TPersistent): string; virtual; diff --git a/ideintf/objectinspector.lfm b/ideintf/objectinspector.lfm index f551911ff0..7e53fe5294 100644 --- a/ideintf/objectinspector.lfm +++ b/ideintf/objectinspector.lfm @@ -4,47 +4,21 @@ object ObjectInspectorDlg: TObjectInspectorDlg Top = 175 Width = 275 HelpContext = 0 - Align = alNone - AllowDropFiles = False - AutoScroll = True - AutoSize = False - BorderIcons = [biSystemMenu, biMinimize, biMaximize] - BorderStyle = bsSizeable Caption = 'ObjectInspectorDlg' - ChildSizing.LeftRightSpacing = 0 - ChildSizing.TopBottomSpacing = 0 - ChildSizing.HorizontalSpacing = 0 - ChildSizing.VerticalSpacing = 0 - ChildSizing.ControlsPerLine = 0 ClientHeight = 669 ClientWidth = 275 - DockSite = False - DragKind = dkDrag - DragMode = dmManual - Enabled = True Font.Height = 0 Font.Style = [] - FormStyle = fsNormal KeyPreview = True OnResize = ObjectInspectorResize - ParentBiDiMode = True - ParentFont = False PopupMenu = MainPopupMenu - Position = poDesigned - ShowInTaskBar = stDefault - UseDockManager = False LCLVersion = '0.9.27' - WindowState = wsNormal object StatusBar: TStatusBar Left = 0 Height = 23 Top = 646 Width = 275 HelpContext = 0 - DragCursor = crDrag - DragKind = dkDrag - DragMode = dmManual - Enabled = True Panels = < item Alignment = taLeftJustify @@ -54,7 +28,6 @@ object ObjectInspectorDlg: TObjectInspectorDlg Alignment = taLeftJustify Width = 50 end> - ParentShowHint = True SimplePanel = False end object AvailPersistentComboBox: TComboBox @@ -64,40 +37,13 @@ object ObjectInspectorDlg: TObjectInspectorDlg Width = 275 HelpContext = 0 Align = alTop - ArrowKeysTraverseList = True AutoComplete = False - AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending] - AutoDropDown = False - AutoSelect = False - AutoSize = True - BorderSpacing.Left = 0 - BorderSpacing.Top = 0 - BorderSpacing.Right = 0 - BorderSpacing.Bottom = 0 - BorderSpacing.Around = 0 - BorderSpacing.CellAlignHorizontal = ccaFill - BorderSpacing.CellAlignVertical = ccaFill - CharCase = ecNormal Ctl3D = False - DragCursor = crDrag - DragMode = dmManual - DropDownCount = 8 - Enabled = True ItemHeight = 13 - ItemIndex = -1 ItemWidth = 0 - MaxLength = 0 OnCloseUp = AvailComboBoxCloseUp - ParentBidiMode = True - ParentColor = False - ParentCtl3D = True - ParentFont = True - ParentShowHint = True - Sorted = False Style = csDropDownList TabOrder = 0 - TabStop = True - Visible = True end object MainPopupMenu: TPopupMenu OnPopup = OnMainPopupMenuPopup diff --git a/ideintf/objectinspector.lrs b/ideintf/objectinspector.lrs index 7c5fa4abd5..c9d697b84c 100644 --- a/ideintf/objectinspector.lrs +++ b/ideintf/objectinspector.lrs @@ -2,35 +2,17 @@ LazarusResources.Add('TObjectInspectorDlg','FORMDATA',[ 'TPF0'#19'TObjectInspectorDlg'#18'ObjectInspectorDlg'#4'Left'#3'$'#1#6'Height' - +#3#157#2#3'Top'#3#175#0#5'Width'#3#19#1#11'HelpContext'#2#0#5'Align'#7#6'alN' - +'one'#14'AllowDropFiles'#8#10'AutoScroll'#9#8'AutoSize'#8#11'BorderIcons'#11 - +#12'biSystemMenu'#10'biMinimize'#10'biMaximize'#0#11'BorderStyle'#7#10'bsSiz' - +'eable'#7'Caption'#6#18'ObjectInspectorDlg'#28'ChildSizing.LeftRightSpacing' - +#2#0#28'ChildSizing.TopBottomSpacing'#2#0#29'ChildSizing.HorizontalSpacing'#2 - +#0#27'ChildSizing.VerticalSpacing'#2#0#27'ChildSizing.ControlsPerLine'#2#0#12 - +'ClientHeight'#3#157#2#11'ClientWidth'#3#19#1#8'DockSite'#8#8'DragKind'#7#6 - +'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#11'Font.Height'#2#0#10'Font.' - +'Style'#11#0#9'FormStyle'#7#8'fsNormal'#10'KeyPreview'#9#8'OnResize'#7#21'Ob' - +'jectInspectorResize'#14'ParentBiDiMode'#9#10'ParentFont'#8#9'PopupMenu'#7#13 - +'MainPopupMenu'#8'Position'#7#10'poDesigned'#13'ShowInTaskBar'#7#9'stDefault' - +#14'UseDockManager'#8#10'LCLVersion'#6#6'0.9.27'#11'WindowState'#7#8'wsNorma' - +'l'#0#10'TStatusBar'#9'StatusBar'#4'Left'#2#0#6'Height'#2#23#3'Top'#3#134#2#5 - +'Width'#3#19#1#11'HelpContext'#2#0#10'DragCursor'#7#6'crDrag'#8'DragKind'#7#6 - +'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#6'Panels'#14#1#9'Alignment'#7 - +#13'taLeftJustify'#5'Width'#2'd'#0#1#9'Alignment'#7#13'taLeftJustify'#5'Widt' - +'h'#2'2'#0#0#14'ParentShowHint'#9#11'SimplePanel'#8#0#0#9'TComboBox'#23'Avai' - +'lPersistentComboBox'#4'Left'#2#0#6'Height'#2#21#3'Top'#2#0#5'Width'#3#19#1 - +#11'HelpContext'#2#0#5'Align'#7#5'alTop'#21'ArrowKeysTraverseList'#9#12'Auto' - +'Complete'#8#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSear' - +'chAscending'#0#12'AutoDropDown'#8#10'AutoSelect'#8#8'AutoSize'#9#18'BorderS' - +'pacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'B' - +'orderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#0'!BorderSpacing.CellAl' - +'ignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill' - +#8'CharCase'#7#8'ecNormal'#5'Ctl3D'#8#10'DragCursor'#7#6'crDrag'#8'DragMode' - +#7#8'dmManual'#13'DropDownCount'#2#8#7'Enabled'#9#10'ItemHeight'#2#13#9'Item' - +'Index'#2#255#9'ItemWidth'#2#0#9'MaxLength'#2#0#9'OnCloseUp'#7#20'AvailCombo' - +'BoxCloseUp'#14'ParentBidiMode'#9#11'ParentColor'#8#11'ParentCtl3D'#9#10'Par' - +'entFont'#9#14'ParentShowHint'#9#6'Sorted'#8#5'Style'#7#14'csDropDownList'#8 - +'TabOrder'#2#0#7'TabStop'#9#7'Visible'#9#0#0#10'TPopupMenu'#13'MainPopupMenu' - +#7'OnPopup'#7#20'OnMainPopupMenuPopup'#4'left'#2#9#3'top'#2#11#0#0#0 + +#3#157#2#3'Top'#3#175#0#5'Width'#3#19#1#11'HelpContext'#2#0#7'Caption'#6#18 + +'ObjectInspectorDlg'#12'ClientHeight'#3#157#2#11'ClientWidth'#3#19#1#11'Font' + +'.Height'#2#0#10'Font.Style'#11#0#10'KeyPreview'#9#8'OnResize'#7#21'ObjectIn' + +'spectorResize'#9'PopupMenu'#7#13'MainPopupMenu'#10'LCLVersion'#6#6'0.9.27'#0 + +#10'TStatusBar'#9'StatusBar'#4'Left'#2#0#6'Height'#2#23#3'Top'#3#134#2#5'Wid' + +'th'#3#19#1#11'HelpContext'#2#0#6'Panels'#14#1#9'Alignment'#7#13'taLeftJusti' + +'fy'#5'Width'#2'd'#0#1#9'Alignment'#7#13'taLeftJustify'#5'Width'#2'2'#0#0#11 + +'SimplePanel'#8#0#0#9'TComboBox'#23'AvailPersistentComboBox'#4'Left'#2#0#6'H' + +'eight'#2#21#3'Top'#2#0#5'Width'#3#19#1#11'HelpContext'#2#0#5'Align'#7#5'alT' + +'op'#12'AutoComplete'#8#5'Ctl3D'#8#10'ItemHeight'#2#13#9'ItemWidth'#2#0#9'On' + +'CloseUp'#7#20'AvailComboBoxCloseUp'#5'Style'#7#14'csDropDownList'#8'TabOrde' + +'r'#2#0#0#0#10'TPopupMenu'#13'MainPopupMenu'#7'OnPopup'#7#20'OnMainPopupMenu' + +'Popup'#4'left'#2#9#3'top'#2#11#0#0#0 ]); diff --git a/ideintf/objectinspector.pp b/ideintf/objectinspector.pp index 196b1dd476..b2f23c0098 100644 --- a/ideintf/objectinspector.pp +++ b/ideintf/objectinspector.pp @@ -477,9 +477,6 @@ type procedure HandleStandardKeys(var Key: Word; Shift: TShiftState); virtual; procedure HandleKeyUp(var Key: Word; Shift: TShiftState); virtual; procedure DoTabKey; virtual; - - procedure EraseBackground(DC: HDC); override; - procedure DoSetBounds(ALeft, ATop, AWidth, AHeight: integer); override; procedure DoSelectionChange; public @@ -498,6 +495,7 @@ type function CanEditRowValue: boolean; procedure SaveChanges; function ConsistencyCheck: integer; + procedure EraseBackground(DC: HDC); override; function GetActiveRow: TOIPropertyGridRow; function GetHintTypeAt(RowIndex: integer; X: integer): TPropEditHint; diff --git a/lcl/controls.pp b/lcl/controls.pp index fdefbf27a3..7897dd7853 100644 --- a/lcl/controls.pp +++ b/lcl/controls.pp @@ -1130,7 +1130,7 @@ type // So, don't use it anymore. public // drag and dock - procedure DragDrop(Source: TObject; X,Y: Integer); Dynamic; + procedure DragDrop(Source: TObject; X,Y: Integer); dynamic; procedure Dock(NewDockSite: TWinControl; ARect: TRect); dynamic; function ManualDock(NewDockSite: TWinControl; DropControl: TControl = nil; diff --git a/lcl/translations.pas b/lcl/translations.pas index db77a4a2e2..cb54e9ffc4 100644 --- a/lcl/translations.pas +++ b/lcl/translations.pas @@ -723,6 +723,7 @@ begin // for each string in lrt/rst list check if it's already // in PO if not add it Value := ''; + Identifier := ''; Multi := false; for i:=0 to InputLines.Count-1 do begin Line:=InputLines[i];