diff --git a/components/codetools/codeatom.pas b/components/codetools/codeatom.pas index 491f018a01..3a267feb1e 100644 --- a/components/codetools/codeatom.pas +++ b/components/codetools/codeatom.pas @@ -112,10 +112,8 @@ type // 0=current=last added // -1=prior current, added before current ... // 1=next first undo item, ... - function GetValueAt(ReverseRelativePos:integer): TAtomPosition; inline; deprecated 'use GetAtomAt(-1-index)'; // Laz 1.9 function IndexOf(StartPos: integer; out RelativePos: integer): boolean; procedure SetIndex(RelativePos: integer); - function Count: integer; inline; deprecated 'use HasPrior or PriorCount instead'; // Laz 1.9 function PriorCount: integer; inline; function NextCount: integer; inline; function HasNext: boolean; inline; @@ -396,11 +394,6 @@ begin Result:=CleanAtomPosition; end; -function TAtomRing.GetValueAt(ReverseRelativePos: integer): TAtomPosition; -begin - Result:=GetAtomAt(-1-ReverseRelativePos); -end; - function TAtomRing.IndexOf(StartPos: integer; out RelativePos: integer): boolean; var p, l, r, m: Integer; @@ -440,11 +433,6 @@ begin {$IFDEF CheckAtomRing}ConsistencyCheck;{$ENDIF} end; -function TAtomRing.Count: integer; -begin - Result:=PriorCount; -end; - procedure TAtomRing.Clear; begin FFirst:=-1; diff --git a/components/codetools/definetemplates.pas b/components/codetools/definetemplates.pas index 385c208c4c..c022ba3674 100644 --- a/components/codetools/definetemplates.pas +++ b/components/codetools/definetemplates.pas @@ -783,8 +783,6 @@ type procedure SaveToXMLConfig(XMLConfig: TXMLConfig; const Path: string); end; - TFPCConfigFileState = TPCConfigFileState deprecated 'use TPCConfigFileState'; // Laz 1.9 - { TPCConfigFileStateList list of TPCConfigFileState } @@ -806,8 +804,6 @@ type procedure SaveToXMLConfig(XMLConfig: TXMLConfig; const Path: string); end; - TFPCConfigFileStateList = TPCConfigFileStateList deprecated 'use TPCConfigFileStateList'; // Laz 1.9 - { TPCFPMFileState Stores information about a fppkg .fpm file } @@ -1083,8 +1079,6 @@ type property ConfigCaches: TPCTargetConfigCaches read FConfigCaches write SetConfigCaches; property TestFilename: string read GetTestFilename write SetTestFilename; // an empty file to test the compiler, will be auto created property ExtraOptions: string read GetExtraOptions write SetExtraOptions; // additional compiler options not used as key, e.g. -Fr - function GetFPCVersion(const CompilerFilename, TargetOS, TargetCPU: string; - UseCompiledVersionAsDefault: boolean): string; deprecated 'use GetPCVersion'; // 2.0.1 function GetPCVersion(const CompilerFilename, TargetOS, TargetCPU: string; UseCompiledVersionAsDefault: boolean; out Kind: TPascalCompiler): string; @@ -1103,8 +1097,6 @@ type out ChangeStamp: integer); end; - TFPCDefinesCache = TCompilerDefinesCache deprecated 'use TCompilerDefinesCache'; // 1.9 - function DefineActionNameToAction(const s: string): TDefineAction; function DefineTemplateFlagsToString(Flags: TDefineTemplateFlags): string; function GetDefaultSrcOSForTargetOS(const TargetOS: string): string; @@ -1113,8 +1105,6 @@ function GetDefaultSrcCPUForTargetCPU(const TargetCPU: string): string; procedure SplitLazarusCPUOSWidgetCombo(const Combination: string; out CPU, OS, WidgetSet: string); function GetCompiledFPCVersion: integer; -function GetCompiledTargetOS: string; deprecated 'use FPCAdds'; -function GetCompiledTargetCPU: string; deprecated 'use FPCAdds'; function GetDefaultCompilerFilename(const TargetCPU: string = ''; Cross: boolean = false): string; procedure GetTargetProcessors(const TargetCPU: string; aList: TStrings); function GetFPCTargetOS(TargetOS: string): string; // normalize @@ -3808,16 +3798,6 @@ begin Result:=FPCVersionToNumber({$I %FPCVERSION%}); end; -function GetCompiledTargetOS: string; -begin - Result:=FPCAdds.GetCompiledTargetOS; -end; - -function GetCompiledTargetCPU: string; -begin - Result:=FPCAdds.GetCompiledTargetCPU; -end; - function GetDefaultCompilerFilename(const TargetCPU: string; Cross: boolean): string; begin @@ -9675,15 +9655,6 @@ begin Result:=false; end; -function TCompilerDefinesCache.GetFPCVersion(const CompilerFilename, TargetOS, - TargetCPU: string; UseCompiledVersionAsDefault: boolean): string; -var - Kind: TPascalCompiler; -begin - Result:=GetPCVersion(CompilerFilename,TargetOS,TargetCPU,UseCompiledVersionAsDefault,Kind); - if Kind=pcFPC then ; -end; - function TCompilerDefinesCache.GetPCVersion(const CompilerFilename, TargetOS, TargetCPU: string; UseCompiledVersionAsDefault: boolean; out Kind: TPascalCompiler): string; diff --git a/components/codetools/fileprocs.pas b/components/codetools/fileprocs.pas index 0afe1b5e65..2c1bd37fc7 100644 --- a/components/codetools/fileprocs.pas +++ b/components/codetools/fileprocs.pas @@ -144,8 +144,6 @@ function GetFPCParameterSrcFile(const CmdLine: string): string; // store date locale independent, thread safe const DateAsCfgStrFormat=LazConfigStorage.DateAsCfgStrFormat; const DateTimeAsCfgStrFormat=LazConfigStorage.DateTimeAsCfgStrFormat; -function DateToCfgStr(const Date: TDateTime; const aFormat: string = DateAsCfgStrFormat): string; deprecated 'use LazConfigStorage'; -function CfgStrToDate(const s: string; out Date: TDateTime; const aFormat: string = DateAsCfgStrFormat): boolean; deprecated 'use LazConfigStorage'; procedure CTIncreaseChangeStamp(var ChangeStamp: integer); inline; procedure CTIncreaseChangeStamp64(var ChangeStamp: int64); inline; @@ -264,17 +262,6 @@ uses Unix; {$ENDIF} -function DateToCfgStr(const Date: TDateTime; const aFormat: string): string; -begin - Result:=LazConfigStorage.DateToCfgStr(Date,aFormat); -end; - -function CfgStrToDate(const s: string; out Date: TDateTime; - const aFormat: string): boolean; -begin - Result:=LazConfigStorage.CfgStrToDate(s,Date,aFormat); -end; - procedure CTIncreaseChangeStamp(var ChangeStamp: integer); begin LazFileCache.LUIncreaseChangeStamp(ChangeStamp); diff --git a/components/ideintf/componenteditors.pas b/components/ideintf/componenteditors.pas index 4fa1310cb5..0650a3baf9 100644 --- a/components/ideintf/componenteditors.pas +++ b/components/ideintf/componenteditors.pas @@ -21,10 +21,10 @@ interface uses Classes, SysUtils, TypInfo, // LCL - LCLProc, Forms, Controls, Menus, ExtCtrls, CustomTimer, + Forms, Controls, Menus, ExtCtrls, CustomTimer, Grids, CheckLst, ComCtrls, Dialogs, // LazUtils - Maps, LazLoggerBase, LazUTF8, + Maps, LazUtilities, LazLoggerBase, LazUTF8, // BuildIntf ComponentReg, // IdeIntf diff --git a/components/ideintf/ideopteditorintf.pas b/components/ideintf/ideopteditorintf.pas index 6a0e26339a..4c040471d7 100644 --- a/components/ideintf/ideopteditorintf.pas +++ b/components/ideintf/ideopteditorintf.pas @@ -55,10 +55,6 @@ type procedure GetSynEditorSettings(ASynEdit: TObject; SimilarEdit: TObject = nil); virtual; abstract; // read-only access to options needed by external packages. // feel free to extend when needed - function CreateSynHighlighter(LazSynHilighter: TLazSyntaxHighlighter): TObject; virtual; abstract; // returns sub-class of TSynCustomHighlighter - deprecated 'Use IdeSyntaxHighlighters (to be removed in 4.99)'; - function ExtensionToLazSyntaxHighlighter(Ext: String): TLazSyntaxHighlighter; virtual; abstract; - deprecated 'Use IdeSyntaxHighlighters.GetIdForLazSyntaxHighlighter (to be removed in 4.99)'; property TabPosition: TTabPosition read GetTabPosition; end; diff --git a/components/ideintf/idetextconverter.pas b/components/ideintf/idetextconverter.pas index e3995598bc..1b43d128f4 100644 --- a/components/ideintf/idetextconverter.pas +++ b/components/ideintf/idetextconverter.pas @@ -26,10 +26,8 @@ interface uses Classes, SysUtils, TypInfo, System.UITypes, - // LCL - LCLProc, // LazUtils - FileUtil, LazFileUtils, LazUTF8, LazLoggerBase, + FileUtil, LazFileUtils, LazUTF8, LazLoggerBase, LazTracer, LazUtilities, // IdeIntf SrcEditorIntf, PropEdits, ObjInspStrConsts; diff --git a/components/ideintf/idewindowintf.pas b/components/ideintf/idewindowintf.pas index 21b20efa27..70ad66dc2b 100644 --- a/components/ideintf/idewindowintf.pas +++ b/components/ideintf/idewindowintf.pas @@ -248,7 +248,6 @@ type vmNeverMoveToVisible, vmOnlyMoveOffScreenToVisible // Only make visible, if offscreen (with a threshold) ); - TLayoutMoveToVisbleMode = TLayoutMoveToVisibleMode deprecated 'Use "TLayoutMoveToVisibleMode" / Will be removed in 4.99'; TSimpleWindowLayoutList = class private diff --git a/components/ideintf/lazideintf.pas b/components/ideintf/lazideintf.pas index d2dee88ddc..1b0dc94d52 100644 --- a/components/ideintf/lazideintf.pas +++ b/components/ideintf/lazideintf.pas @@ -160,10 +160,6 @@ type ); TProjectBuildFlags = set of TProjectBuildFlag; - // Deprecase in Lazarus 3.99, March 2024. - TSearchIDEFileFlag = BaseIDEIntf.TSearchIDEFileFlag deprecated 'Use the definition from BaseIDEIntf'; - TSearchIDEFileFlags = BaseIDEIntf.TSearchIDEFileFlags deprecated 'Use the definition from BaseIDEIntf'; - // find unit flags // Normally you don't need to pass any flags. TFindUnitFileFlag = ( diff --git a/components/jcf2/ReadWrite/ConvertTypes.pas b/components/jcf2/ReadWrite/ConvertTypes.pas index afddb69fc5..316b4145ce 100644 --- a/components/jcf2/ReadWrite/ConvertTypes.pas +++ b/components/jcf2/ReadWrite/ConvertTypes.pas @@ -72,17 +72,9 @@ const 'XML files (*.xml)|*.xml|' + 'All files (*.*)|*.*'; -function DescribeFileCount(const piCount: integer): string; deprecated; implementation -uses SysUtils, jcfbaseConsts; - -function DescribeFileCount(const piCount: integer): string; -begin - Result := Format(lisMsgFiles,[piCount]); -end; - end. diff --git a/components/jcf2/Utils/JcfStringUtils.pas b/components/jcf2/Utils/JcfStringUtils.pas index 11479521fa..9166e4cd6e 100644 --- a/components/jcf2/Utils/JcfStringUtils.pas +++ b/components/jcf2/Utils/JcfStringUtils.pas @@ -126,7 +126,6 @@ function StrCharCount(const S: string; C: Char): Integer; function StrStrCount(const S, SubS: string): Integer; function StrRepeat(const S: string; Count: Integer): string; procedure StrReplace(var S: string; const Search, Replace: string; Flags: TReplaceFlags = []); -function StrSearch(const Substr, S: string; const Index: Integer = 1): Integer; inline; deprecated 'Use Pos instead'; function StrFind(const Substr, S: string; const Index: Integer = 1): Integer; function BooleanToStr(B: Boolean): string; @@ -414,11 +413,6 @@ begin S := StringReplace(S, Search, Replace, Flags); end; -function StrSearch(const Substr, S: string; const Index: Integer = 1): Integer; -begin - Result := Pos(SubStr, S ,Index); -end; - function StrFind(const Substr, S: string; const Index: Integer = 1): Integer; // Case-insensitive version of StrSearch. begin diff --git a/components/lazutils/laz2_dom.pas b/components/lazutils/laz2_dom.pas index 74aa98bcb3..cd622452d4 100644 --- a/components/lazutils/laz2_dom.pas +++ b/components/lazutils/laz2_dom.pas @@ -348,7 +348,7 @@ type function GetCount: LongWord; function GetItem(index: LongWord): TDOMNode; function NodeFilter({%H-}aNode: TDOMNode): TFilterResult; virtual; - procedure BuildList; virtual; deprecated 'Use NodeFilter instead.'; + procedure BuildList; virtual; public constructor Create(ANode: TDOMNode); destructor Destroy; override; diff --git a/components/lazutils/lazmethodlist.pas b/components/lazutils/lazmethodlist.pas index c14fde1ae5..86dd0330ce 100644 --- a/components/lazutils/lazmethodlist.pas +++ b/components/lazutils/lazmethodlist.pas @@ -65,8 +65,6 @@ type end; function SameMethod(const m1, m2: TMethod): boolean; inline; -function CompareMethods(const m1, m2: TMethod): boolean; inline; - deprecated 'Use SameMethod instead.'; // In 2.3 October 2021. Remove in 2.5. implementation @@ -80,11 +78,6 @@ begin {$POP} end; -function CompareMethods(const m1, m2: TMethod): boolean; -begin - Result := SameMethod(m1, m2); -end; - { TMethodList.TItemsEnumerator } function TMethodList.TItemsEnumerator.GetCurrent: TMethod; diff --git a/components/lazutils/lazstringutils.pas b/components/lazutils/lazstringutils.pas index e78871b44a..90d259f1a2 100644 --- a/components/lazutils/lazstringutils.pas +++ b/components/lazutils/lazstringutils.pas @@ -43,7 +43,6 @@ function LazStartsText(const ASubText, AText: string): Boolean; function LazEndsText(const ASubText, AText: string): Boolean; function PosI(const SubStr, S: string): integer; function IsNumeric(s: String): Boolean; -function IsNumber(s: String): Boolean; deprecated 'Use IsNumeric; to be removed in v4.99'; // Functions for line endings function LineEndingCount(const Txt: string; var LengthOfLastLine: integer): integer; @@ -110,10 +109,6 @@ function StrLScan(P: PChar; c: Char; MaxLen: Cardinal): PChar; function SaveStringToFile(const aString, aFileName: String): Boolean; function LoadStringFromFile(const aFileName: String): String; -// Like IsValidIdent() in FPC 3.1. -function LazIsValidIdent(const Ident: string; AllowDots: Boolean = False; - StrictDots: Boolean = False): Boolean; deprecated 'Use SysUtils.IsValidIdent instead'; //Remove in 4.99 - const MaxTextLen = 80; @@ -219,11 +214,6 @@ begin Result := false; end; -function IsNumber(s: String): Boolean; -begin - Result := IsNumeric(s); -end; - function LineEndingCount(const Txt: string; var LengthOfLastLine: integer): integer; var i, LastLineEndPos, TxtLen: integer; @@ -1442,11 +1432,5 @@ begin end; end; -function LazIsValidIdent(const Ident: string; AllowDots: Boolean = False; - StrictDots: Boolean = False): Boolean; -begin - Result := SysUtils.IsValidIdent(Ident, AllowDots, StrictDots); -end; - end. diff --git a/components/lazutils/lazutf8.pas b/components/lazutils/lazutf8.pas index 4c29e8dd95..c6b61781ba 100644 --- a/components/lazutils/lazutf8.pas +++ b/components/lazutils/lazutf8.pas @@ -184,10 +184,6 @@ function UTF8CompareStrP(S1, S2: PChar): PtrInt; function UTF8CompareStr(S1: PChar; Count1: SizeInt; S2: PChar; Count2: SizeInt): PtrInt; function UTF8CompareText(const S1, S2: string): PtrInt; function UTF8CompareTextP(S1, S2: PChar): PtrInt; -// Deprecated in Lazarus 3.99, February 2024. -function UTF8CompareLatinTextFast(S1, S2: String): PtrInt; deprecated 'Use UTF8CompareText or AnsiCompareText instead.'; -function UTF8CompareStrCollated(const S1, S2: string): PtrInt; deprecated 'Use UTF8CompareStr instead.'; -function CompareStrListUTF8LowerCase(List: TStringList; Index1, Index2: Integer): Integer; type @@ -223,10 +219,6 @@ function UTF8ToUTF16(const P: PChar; ByteCnt: SizeUInt): UnicodeString; overload function UTF16ToUTF8(const S: UnicodeString): AnsiString; overload; inline; function UTF16ToUTF8(const P: PWideChar; WideCnt: SizeUInt): AnsiString; overload; -// locale -procedure LazGetLanguageIDs(var Lang, FallbackLang: String); deprecated 'Use GetLanguageID function from Translations unit instead'; // Lazarus 2.3.0 -procedure LazGetShortLanguageID(var Lang: String); deprecated 'Use GetLanguageID function from Translations unit instead'; // Lazarus 2.3.0 - var FPUpChars: array[char] of char; @@ -3581,27 +3573,6 @@ begin Result := WideCompareText(UTF8ToUTF16(S1,StrLen(S1)), UTF8ToUTF16(S2,StrLen(S2))); end; -function UTF8CompareLatinTextFast(S1, S2: String): PtrInt; -begin - Result := UTF8CompareText(S1, S2); -end; - -function UTF8CompareStrCollated(const S1, S2: string): PtrInt; -begin - {$IFDEF ACP_RTL} - //Only with this define AnsiCompareStr does not point to Utf8CompareStr - Result := AnsiCompareStr(UTF8ToSys(S1), UTF8ToSys(S2)); - {$ELSE} - Result := Utf8CompareStr(S1,S2); - {$ENDIF} -end; - -function CompareStrListUTF8LowerCase(List: TStringList; Index1, Index2: Integer - ): Integer; -begin - Result:=UTF8CompareText(List[Index1],List[Index2]); -end; - {------------------------------------------------------------------------------ Name: ConvertUTF8ToUTF16 Params: Dest - Pointer to destination string @@ -4029,29 +4000,6 @@ begin Result := ''; end; -procedure LazGetLanguageIDs(var Lang, FallbackLang: String); -var - LangID: TLanguageID; -begin - LangID := GetLanguageID; - Lang := LangID.LanguageID; - FallbackLang := LangID.LanguageCode; -end; - -{ -This routine will return current short language ID (without the country code). - -Ideally the resulting ID from here should conform to ISO 639-1 -or ISO 639-2, if the language has no code in ISO 639-1. -} -procedure LazGetShortLanguageID(var Lang: String); -var - LangID: TLanguageID; -begin - LangID := GetLanguageID; - Lang := LangID.LanguageCode; -end; - procedure InitFPUpchars; var c: Char; diff --git a/components/lazutils/masks.pas b/components/lazutils/masks.pas index dd86f01f8c..e1a6534efb 100644 --- a/components/lazutils/masks.pas +++ b/components/lazutils/masks.pas @@ -240,21 +240,14 @@ type class function CompareUTF8Sequences(const P1,P2: PChar): integer; static; function intfMatches(aMatchOffset: integer; aMaskIndex: integer): TMaskFailCause; //override; public - {$IFDEF debug_maskcompiled} procedure DumpMaskCompiled; {$ENDIF} - constructor Create(const aMask: String); overload; constructor Create(const aMask: String; aCaseSensitive: Boolean); overload; constructor Create(const aMask: String; aCaseSensitive: Boolean; aOpcodesAllowed: TMaskOpCodes); virtual; overload; - constructor Create(const aMask: String; aOptions: TMaskOptions); overload; - deprecated 'Use Create with TMaskOpCodes params.'; // in Lazarus 2.3, remove in 2.5. - procedure Compile; virtual; function Matches(const aStringToMatch: String): Boolean; virtual; - function MatchesWindowsMask(const AFileName: String): Boolean; - deprecated 'Create with TMaskWindows.Create, then call Matches.'; // in Lazarus 2.3, remove in 2.5. public property Mask: String read GetMask write SetMask; end; @@ -321,19 +314,9 @@ type public constructor Create(const aValue: String; aSeparator: Char=';'; CaseSensitive: Boolean=False; aOpcodesAllowed: TMaskOpCodes=DefaultMaskOpCodes); virtual; - - //Remove in 2.5 - constructor Create(const aValue: String; aSeparator: Char; aOptions: TMaskOptions); virtual; - deprecated 'Use Create with TMaskOpcodes paramater'; - destructor Destroy; override; - function Matches(const AFileName: String): Boolean; - // Deprecated in Lazarus 2.3, October 2021. Remove in 2.5. - function MatchesWindowsMask(const AFileName: String): Boolean; - deprecated 'Use a TWindowsMaskList instead.'; - property Count: Integer read GetCount; property Items[Index: Integer]: TMask read GetItem; property Mask: String read fMask write SetMask; @@ -359,11 +342,7 @@ type constructor Create(const aValue: String; aSeparator: Char{=';'}; aCaseSensitive: Boolean{=False}; aOpcodesAllowed: TMaskOpCodes{=DefaultMaskOpCodes}; - aWindowsQuirksAllowed: TWindowsQuirks{=DefaultWindowsQuirks}); overload; //reintroduce; - - //Remove in 2.5 - constructor Create(const aValue: String; aSeparator: Char; aOptions: TMaskOptions); override; - deprecated 'Use Create with TMaskOpcodes paramater'; + aWindowsQuirksAllowed: TWindowsQuirks{=DefaultWindowsQuirks}); overload; property Quirks: TWindowsQuirks read fWindowsQuirks write SetQuirks; end; @@ -373,8 +352,6 @@ type function MatchesMask(const FileName, Mask: String; CaseSensitive: Boolean=False; aOpcodesAllowed: TMaskOpCodes=DefaultMaskOpCodes): Boolean; -function MatchesMask(const FileName, Mask: String; Options: TMaskOptions): Boolean; - deprecated 'Use MatchesMask with TMaskOpCodes params.'; // in Lazarus 2.3, remove in 2.5. function MatchesWindowsMask(const FileName, Mask: String; CaseSensitive: Boolean=False; aOpcodesAllowed: TMaskOpCodes=DefaultMaskOpCodes; @@ -384,18 +361,11 @@ function MatchesWindowsMask(const FileName, Mask: String; Options: TMaskOptions) function MatchesMaskList(const FileName, Mask: String; Separator: Char=';'; CaseSensitive: Boolean=False; aOpcodesAllowed: TMaskOpCodes=DefaultMaskOpCodes): Boolean; -function MatchesMaskList(const FileName, Mask: String; Separator: Char; - Options: TMaskOptions): Boolean; - deprecated 'Use MatchesMaskList with TMaskOpCodes params.'; // in Lazarus 2.3, remove in 2.5. function MatchesWindowsMaskList(const FileName, Mask: String; Separator: Char=';'; CaseSensitive: Boolean=False; aOpcodesAllowed: TMaskOpCodes=DefaultMaskOpCodes; aWindowsQuirksAllowed: TWindowsQuirks=DefaultWindowsQuirks): Boolean; -function MatchesWindowsMaskList(const FileName, Mask: String; Separator: Char; - Options: TMaskOptions): Boolean; - deprecated 'Use MatchesWindowsMaskList with TMaskOpCodes params.'; // in Lazarus 2.3, remove in 2.5. - function DbgS(O: TMaskOpCodes): String ; overload; function DbgS(Q: TWindowsQuirks): String ; overload; @@ -458,12 +428,6 @@ begin end; -function MatchesMask(const FileName, Mask: String; Options: TMaskOptions): Boolean; -begin - Result := MatchesMask(FileName, Mask, moCaseSensitive in Options, - EncodeDisableRange(Options)); -end; - function MatchesWindowsMask(const FileName, Mask: String; CaseSensitive: Boolean; aOpcodesAllowed: TMaskOpCodes; aWindowsQuirksAllowed: TWindowsQuirks): Boolean; var @@ -496,13 +460,6 @@ begin end; end; -function MatchesMaskList(const FileName, Mask: String; Separator: Char; - Options: TMaskOptions): Boolean; -begin - Result := MatchesMaskList(FileName, Mask, Separator, moCaseSensitive in Options, - EncodeDisableRange(Options)); -end; - function MatchesWindowsMaskList(const FileName, Mask: String; Separator: Char; CaseSensitive: Boolean; aOpcodesAllowed: TMaskOpCodes; aWindowsQuirksAllowed: TWindowsQuirks): Boolean; var @@ -516,13 +473,6 @@ begin end; end; -function MatchesWindowsMaskList(const FileName, Mask: String; Separator: Char; - Options: TMaskOptions): Boolean; -begin - Result := MatchesWindowsMaskList(FileName, Mask, Separator, moCaseSensitive in Options, - EncodeDisableRange(Options)); -end; - { TWindowsMaskList } procedure TWindowsMaskList.SetQuirks(AValue: TWindowsQuirks); @@ -580,12 +530,6 @@ begin inherited Create(aValue, aSeparator, aCaseSensitive, aOpcodesAllowed); end; -constructor TWindowsMaskList.Create(const aValue: String; aSeparator: Char; - aOptions: TMaskOptions); -begin - Create(aValue, aSeparator, (moCaseSensitive in aOptions), DefaultMaskOpCodes, DefaultWindowsQuirks); -end; - { EMaskError } @@ -1291,12 +1235,6 @@ begin end; -constructor TMaskUTF8.Create(const aMask: String; aOptions: TMaskOptions); -begin - inherited Create(aOptions); - fOriginalMask:=aMask; -end; - function TMaskUTF8.Matches(const aStringToMatch: String): Boolean; begin if not fMaskIsCompiled then Compile; @@ -1312,18 +1250,6 @@ begin Result:=false; // There are too many or not enough bytes to match the string end; -function TMaskUTF8.MatchesWindowsMask(const AFileName: String): Boolean; -var - WinMask: TWindowsMaskUTF8; -begin - WinMask:=TWindowsMaskUTF8.Create(fOriginalMask, CaseSensitive, fMaskOpCodesAllowed); - try - Result:=WinMask.Matches(AFileName); - finally - WinMask.Free; - end; -end; - { TWindowsMask } procedure TWindowsMaskUTF8.SetMask(AValue: String); @@ -1564,19 +1490,6 @@ begin AddMasksToList(aValue, aSeparator, CaseSensitive, aOpcodesAllowed); end; -constructor TMaskList.Create(const aValue: String; aSeparator: Char; aOptions: TMaskOptions); -var - CaseSens: Boolean; - Opcodes: TMaskOpCodes; -begin - CaseSens:=moCaseSensitive in aOptions; - if moDisableSets in aOptions then - Opcodes:=MaskOpCodesDisableRange - else - Opcodes:=DefaultMaskOpCodes; - Create(aValue, aSeparator, CaseSens, Opcodes); -end; - destructor TMaskList.Destroy; begin fMasks.Free; @@ -1662,18 +1575,5 @@ begin Exit(True); end; -function TMaskList.MatchesWindowsMask(const AFileName: String): Boolean; -//use the same hack as in TMask.MatchesWindowsMask -var - WML: TWindowsMaskList; -begin - WML := TWindowsMaskList.Create(fMask, fSeparator, fCaseSensitive, fMaskOpcodes, DefaultWindowsQuirks); - try - Result := WML.Matches(AFileName); - finally - WML.Free; - end; -end; - end. diff --git a/ide/editoroptions.pp b/ide/editoroptions.pp index 7c2e60219d..e2a0d13cd8 100644 --- a/ide/editoroptions.pp +++ b/ide/editoroptions.pp @@ -1870,10 +1870,6 @@ type procedure GetHighlighterSettings(Syn: TSrcIDEHighlighter); // read highlight settings from config file procedure GetSynEditorSettings(ASynEdit: TObject; SimilarEdit: TObject = nil); override; procedure GetSynEditSettings(ASynEdit: TSynEdit; SimilarEdit: TSynEdit = nil); // read synedit settings from config file - function CreateSyn(LazSynHilighter: TLazSyntaxHighlighter): TSrcIDEHighlighter; - deprecated 'Use IdeSyntaxHighlighters (to be removed in 4.0)'; - function CreateSynHighlighter(LazSynHilighter: TLazSyntaxHighlighter): TObject; override; - deprecated 'Use IdeSyntaxHighlighters (to be removed in 4.0)'; procedure GetSynEditPreviewSettings(APreviewEditor: TObject); procedure SetMarkupColor(Syn: TSrcIDEHighlighter; AddHilightAttr: TAdditionalHilightAttribute; @@ -1881,8 +1877,6 @@ type procedure SetMarkupColors(aSynEd: TSynEdit); procedure ApplyFontSettingsTo(ASynEdit: TSynEdit); procedure ApplyTabFontSettingsTo(APageCtrl: TPageControl); - function ExtensionToLazSyntaxHighlighter(Ext: String): TLazSyntaxHighlighter; override; - deprecated 'Use IdeSyntaxHighlighters.GetIdForFileExtension (to be removed in 4.0)'; public // general options property SynEditOptions: TSynEditorOptions @@ -6650,16 +6644,6 @@ begin APageCtrl.Font.Quality := fqDefault; end; -function TEditorOptions.ExtensionToLazSyntaxHighlighter(Ext: String): TLazSyntaxHighlighter; -var - LangID: Integer; -begin - Result := lshNone; - LangID := HighlighterList.GetIdForFileExtension(Ext); - if LangID >= 0 then - Result := HighlighterList[LangID].TheType; -end; - procedure TEditorOptions.GetSynEditSettings(ASynEdit: TSynEdit; SimilarEdit: TSynEdit); // read synedit settings from config file // if SimilarEdit is given it is used for speed up @@ -6926,24 +6910,6 @@ begin end; end; -function TEditorOptions.CreateSyn(LazSynHilighter: TLazSyntaxHighlighter): TSrcIDEHighlighter; -var - L: TEditOptLanguageInfo; -begin - Result := nil; - L := HighlighterList[HighlighterList.GetIdForLazSyntaxHighlighter(LazSynHilighter)]; - if L <> nil then begin - Result := L.CreateNewSynInstance; - GetHighlighterSettings(Result); - end; -end; - -function TEditorOptions.CreateSynHighlighter( - LazSynHilighter: TLazSyntaxHighlighter): TObject; -begin - Result := CreateSyn(LazSynHilighter){%H-}; -end; - procedure TEditorOptions.GetSynEditPreviewSettings(APreviewEditor: TObject); // read synedit setings from config file var diff --git a/ide/frames/window_options.pas b/ide/frames/window_options.pas index f9e6ea8815..3c8fdd65bc 100644 --- a/ide/frames/window_options.pas +++ b/ide/frames/window_options.pas @@ -89,7 +89,7 @@ begin exit; rev := LazarusRevisionStr; - if IsNumber(rev) then + if IsNumeric(rev) then NewCaption := Format(lisLazarusEditorV + ' r%s', [LazarusVersionStr, rev]) else diff --git a/ide/main.pp b/ide/main.pp index 553d1125ac..d342cdeaf4 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -9003,13 +9003,13 @@ procedure TMainIDE.UpdateCaption; end; var - rev, NewCaption, DirName, CustomCaption: String; + rev, NewCaption, CustomCaption: String; OldMarkUnhandledMacros: boolean; begin if MainIDEBar = nil then Exit; if ToolStatus = itExiting then Exit; rev := LazarusRevisionStr; - if IsNumber(rev) then + if IsNumeric(rev) then NewCaption := Format(lisLazarusEditorV + ' r%s', [LazarusVersionStr, rev]) else diff --git a/ide/packages/idepackager/packagelinks.pas b/ide/packages/idepackager/packagelinks.pas index 14b5245226..e0fc57b3a8 100644 --- a/ide/packages/idepackager/packagelinks.pas +++ b/ide/packages/idepackager/packagelinks.pas @@ -44,7 +44,7 @@ uses Forms, // LazUtils Laz2_XMLCfg, LazFileCache, LazFileUtils, FileUtil, LazUtilities, LazTracer, - AvgLvlTree, + LazConfigStorage, AvgLvlTree, // Codetools FileProcs, CodeToolManager, // BuildIntf diff --git a/lcl/controls.pp b/lcl/controls.pp index 8239b4b533..2b4f7033b1 100644 --- a/lcl/controls.pp +++ b/lcl/controls.pp @@ -66,11 +66,6 @@ const {$ENDIF} mrLast = System.UITypes.mrLast; -//function GetModalResultStr(ModalResult: TModalResult): ShortString; -// deprecated 'Use the ModalResultStr array from unit System.UITypes directly.'; -//property ModalResultStr[ModalResult: TModalResult]: shortstring read GetModalResultStr; - -const // define aliases for Delphi compatibility fsSurface = GraphType.fsSurface; fsBorder = GraphType.fsBorder; @@ -1805,7 +1800,6 @@ type property Enabled: Boolean read GetEnabled write SetEnabled stored IsEnabledStored default True; property Font: TFont read FFont write SetFont stored IsFontStored; property IsControl: Boolean read FIsControl write FIsControl; - property MouseEntered: Boolean read FMouseInClient; deprecated 'use MouseInClient instead';// changed in 1.9, will be removed in 1.11 property MouseInClient: Boolean read FMouseInClient; property OnChangeBounds: TNotifyEvent read FOnChangeBounds write FOnChangeBounds; property OnClick: TNotifyEvent read FOnClick write FOnClick; @@ -3063,11 +3057,6 @@ begin WriteStr(Result, fs); end; -function GetModalResultStr(ModalResult: TModalResult): ShortString; -begin - Result := System.UITypes.ModalResultStr[ModalResult]; -end; - {------------------------------------------------------------------------------ RecreateWnd This function was originally member of TWincontrol. From a VCL point of view diff --git a/lcl/include/winapi.inc b/lcl/include/winapi.inc index 0018b85c93..7b3f01698a 100644 --- a/lcl/include/winapi.inc +++ b/lcl/include/winapi.inc @@ -1534,38 +1534,12 @@ begin Result := aParam and $FFFF; end; -{------------------------------------------------------------------------------ - Function: OffsetRect - Params: Rect: points to structure that moves. - dx : amount to move the rect to left or right. Must be negative to move to left. - dy : amount to move the rect up or down. Mmust be negative to move up. - Returns: True if succesful - - Moves the rectangle up or down, left or right. - ------------------------------------------------------------------------------} -function OffsetRect(var Rect: TRect; dx,dy: Integer): Boolean; -begin - Result:=Types.OffsetRect(Rect,dx,dy); -end; - -{------------------------------------------------------------------------------ - Function: PointtoSmallPoint - Params: - Returns: - - ------------------------------------------------------------------------------} function PointtoSmallPoint(const P : TPoint) : TSmallPoint; inline; begin Result.X := P.X; Result.Y := P.Y; end; -{------------------------------------------------------------------------------ - Function: PointToSmallPointNoChecks - Params: - Returns: - - ------------------------------------------------------------------------------} function PointToSmallPointNoChecks(const P : TPoint) : TSmallPoint; inline; begin {$PUSH} diff --git a/lcl/include/winapih.inc b/lcl/include/winapih.inc index 35137cc1d0..229a6d1a0f 100644 --- a/lcl/include/winapih.inc +++ b/lcl/include/winapih.inc @@ -340,9 +340,6 @@ procedure LParamExtractLoHiWord(const aParam: LPARAM; out LoWord, HiWord: Word); function LParamHiWord(const aParam: LPARAM): Word; inline; function LParamLoWord(const aParam: LPARAM): Word; inline; -// Deprecated in version 2.3, 2023-06. -function OffsetRect(var Rect: TRect; dx,dy: Integer): Boolean; deprecated 'Use Types.OffsetRect instead'; - function PtInRect(const Rect : TRect; const Point : TPoint) : Boolean; inline; function PointToSmallPoint(const P : TPoint) : TSmallPoint; inline; function PointToSmallPointNoChecks(const P : TPoint) : TSmallPoint; inline; diff --git a/lcl/lclproc.pas b/lcl/lclproc.pas index 7301c92307..4eeede9461 100644 --- a/lcl/lclproc.pas +++ b/lcl/lclproc.pas @@ -110,16 +110,6 @@ var function SendApplicationMessage(Msg: Cardinal; WParam: WParam; LParam: LParam):Longint; procedure OwnerFormDesignerModified(AComponent: TComponent); -// Deprecated in version 2.3, 2023-06. -procedure FreeThenNil(var obj); deprecated 'Use LazUtilities.FreeThenNil instead'; -function CompareRect(R1, R2: PRect): Boolean; deprecated 'Use GraphMath.SameRect instead'; -function OffsetRect(var Rect: TRect; DX, DY: Integer): Boolean; deprecated 'Use Types.OffsetRect instead'; -procedure MoveRect(var ARect: TRect; x, y: Integer); deprecated 'Use GraphMath.MoveRect instead'; -procedure MoveRectToFit(var ARect: TRect; const MaxRect: TRect); deprecated 'Use GraphMath.MoveRectToFit instead'; -procedure MakeMinMax(var i1, i2: integer); deprecated 'Use GraphMath.MakeMinMax instead'; -procedure CalculateLeftTopWidthHeight(X1,Y1,X2,Y2: integer; - out Left,Top,Width,Height: integer); deprecated 'Use GraphMath.CalculateLeftTopWidthHeight instead'; - { the LCL interfaces finalization sections are called before the finalization sections of the LCL. Those parts, that should be finalized after the LCL, can be registered here. } @@ -233,18 +223,6 @@ procedure DbgAppendToFileWithoutLn(FileName, S: String); function ClassCase(const AClass: TClass; const ACase: array of TClass {; const ADescendant: Boolean = True}): Integer; overload; function ClassCase(const AClass: TClass; const ACase: array of TClass; const ADescendant: Boolean): Integer; overload; -// Deprecated in Lazarus 3.99 July 2023. -function UTF16CharacterLength(p: PWideChar): integer; deprecated 'Use LazUTF16.UTF16CharacterLength instead'; -function UTF16Length(const s: UnicodeString): PtrInt; deprecated 'Use LazUTF16.UTF16Length instead'; -function UTF16Length(p: PWideChar; WordCount: PtrInt): PtrInt; deprecated 'Use LazUTF16.UTF16Length instead'; -function UTF16CharacterToUnicode(p: PWideChar; out CharLen: integer): Cardinal; deprecated 'Use LazUTF16.UTF16CharacterToUnicode instead'; -function UnicodeToUTF16(u: cardinal): UnicodeString; deprecated 'Use LazUTF16.UnicodeToUTF16 instead'; - -// identifier -// Deprecated in Lazarus 3.99 April 2024. -function CreateFirstIdentifier(const Identifier: string): string; deprecated 'Use LazUtilities.CreateFirstIdentifier instead'; -function CreateNextIdentifier(const Identifier: string): string; deprecated 'Use LazUtilities.CreateNextIdentifier instead'; - // Font function IsFontNameDefault(const AName: string): boolean; inline; @@ -839,42 +817,6 @@ begin end; end; -procedure FreeThenNil(var obj); -begin - LazUtilities.FreeThenNil(obj); -end; - -function CompareRect(R1, R2: PRect): Boolean; -begin - Result := GraphMath.SameRect(R1, R2); -end; - -function OffsetRect(var Rect: TRect; DX, DY: Integer): Boolean; -begin - Result := Types.OffsetRect(Rect, DX, DY); -end; - -procedure MoveRect(var ARect: TRect; x, y: Integer); -begin - GraphMath.MoveRect(ARect, x, y); -end; - -procedure MoveRectToFit(var ARect: TRect; const MaxRect: TRect); -begin - GraphMath.MoveRectToFit(ARect, MaxRect); -end; - -procedure MakeMinMax(var i1, i2: integer); -begin - GraphMath.MakeMinMax(i1, i2); -end; - -procedure CalculateLeftTopWidthHeight(X1, Y1, X2, Y2: integer; - out Left, Top, Width, Height: integer); -begin - GraphMath.CalculateLeftTopWidthHeight(X1, Y1, X2, Y2, Left, Top, Width, Height); -end; - procedure RegisterInterfaceInitializationHandler(p: TProcedure); begin InterfaceInitializationHandlers.Add(p); @@ -1563,41 +1505,6 @@ begin Result := -1; end; -function UTF16CharacterLength(p: PWideChar): integer; -begin - Result:=LazUTF16.UTF16CharacterLength(p); -end; - -function UTF16Length(const s: UnicodeString): PtrInt; -begin - Result:=LazUTF16.UTF16Length(s); -end; - -function UTF16Length(p: PWideChar; WordCount: PtrInt): PtrInt; -begin - Result:=LazUTF16.UTF16Length(p, WordCount); -end; - -function UTF16CharacterToUnicode(p: PWideChar; out CharLen: integer): Cardinal; -begin - Result:=LazUTF16.UTF16CharacterToUnicode(p, CharLen); -end; - -function UnicodeToUTF16(u: cardinal): UnicodeString; -begin - Result:=LazUTF16.UnicodeToUTF16(u); -end; - -function CreateFirstIdentifier(const Identifier: string): string; -begin - Result:=LazUtilities.CreateFirstIdentifier(Identifier); -end; - -function CreateNextIdentifier(const Identifier: string): string; -begin - Result:=LazUtilities.CreateNextIdentifier(Identifier); -end; - function IsFontNameDefault(const AName: string): boolean; begin Result := CompareText(AName, 'default') = 0;