diff --git a/components/aggpas/src/agg_fpimage.pas b/components/aggpas/src/agg_fpimage.pas index daf2a19db4..49a79bccbc 100644 --- a/components/aggpas/src/agg_fpimage.pas +++ b/components/aggpas/src/agg_fpimage.pas @@ -382,11 +382,7 @@ type property Bold; // only windows property Italic; // only windows property Underline; // not supported - {$IF (FPC_FULLVERSION<=20600) or (FPC_FULLVERSION=20602)} - property StrikeTrough; //old version with typo - {$ELSE} property StrikeThrough; - {$ENDIF} end; { TAggFPPath } diff --git a/components/cairocanvas/cairocanvas.pas b/components/cairocanvas/cairocanvas.pas index e16500872a..b4a564abf2 100644 --- a/components/cairocanvas/cairocanvas.pas +++ b/components/cairocanvas/cairocanvas.pas @@ -19,11 +19,7 @@ unit CairoCanvas; |____TCairoSvgCanvas *) {$mode objfpc}{$H+} - -{$if (FPC_FULLVERSION>=20701)} {$Packset 1} -{$endif} - {$define pangocairo} {-$define DebugClip} diff --git a/components/cairocanvas/cairocanvasall.pas b/components/cairocanvas/cairocanvasall.pas index 01fb33a526..1ccb0be3a5 100644 --- a/components/cairocanvas/cairocanvasall.pas +++ b/components/cairocanvas/cairocanvasall.pas @@ -7,7 +7,7 @@ unit CairoCanvasAll; interface -{$IF ((FPC_FULLVERSION>=20701) or not defined(win64)) and not defined(WinCE)} +{$IF not defined(WinCE)} uses {%H-}CairoCanvas, {%H-}CairoPrinter; {$ENDIF} diff --git a/components/chmhelp/lhelp/chmcontentprovider.pas b/components/chmhelp/lhelp/chmcontentprovider.pas index 4966adebe1..286eff3e0a 100644 --- a/components/chmhelp/lhelp/chmcontentprovider.pas +++ b/components/chmhelp/lhelp/chmcontentprovider.pas @@ -10,11 +10,9 @@ unit ChmContentProvider; {$Note Compiling lhelp with search support} {$DEFINE CHM_SEARCH} -{$IF FPC_FULLVERSION>=20400} {$Note Compiling lhelp *with* binary index and toc support} // CHMs can have both binary and text Table of Contents and index {$DEFINE CHM_BINARY_INDEX_TOC} // internal chm index else external file`s indexes -{$endif} {off $DEFINE CHM_DEBUG_TIME} diff --git a/components/codetools/eventcodetool.pas b/components/codetools/eventcodetool.pas index 1c96bb36b6..128f5b1ae4 100644 --- a/components/codetools/eventcodetool.pas +++ b/components/codetools/eventcodetool.pas @@ -199,7 +199,7 @@ begin ParamString:=''; for i:=0 to ParamCount-1 do begin // read ParamFlags - Len:={$IF FPC_FULLVERSION>=30000}SizeOf(TParamFlags){$ELSE}1{$ENDIF}; + Len:=SizeOf(TParamFlags); ParamType.Flags:=[]; Move(TypeData^.ParamList[Offset],ParamType.Flags,Len); inc(Offset,Len); diff --git a/components/fpreport/design/reportconns.pp b/components/fpreport/design/reportconns.pp index 6b97504827..4e66007892 100644 --- a/components/fpreport/design/reportconns.pp +++ b/components/fpreport/design/reportconns.pp @@ -13,21 +13,15 @@ unit reportconns; {$DEFINE HASORACLECONNECTION} {$ENDIF} -{$IF FPC_FULLVERSION >= 20601} - // MS SQL Server and Sybase ASE connectors were introduced in the FPC 2.7 development branch, - // and backported to 2.6.1. Operating systems should match FPC packages\fcl-db\fpmake.pp - {$IF DEFINED(BEOS) OR DEFINED(HAIKU) OR DEFINED(LINUX) OR DEFINED(FREEBSD) OR DEFINED (NETBSD) OR DEFINED(OPENBSD) OR DEFINED(WIN32) OR DEFINED(WIN64)} - {$DEFINE HASMSSQLCONNECTION} - {$DEFINE HASSYBASECONNECTION} - {$ENDIF} +// MS SQL Server and Sybase ASE connectors were introduced in the FPC 2.7 development branch, +// and backported to 2.6.1. Operating systems should match FPC packages\fcl-db\fpmake.pp +{$IF DEFINED(BEOS) OR DEFINED(HAIKU) OR DEFINED(LINUX) OR DEFINED(FREEBSD) OR DEFINED (NETBSD) OR DEFINED(OPENBSD) OR DEFINED(WIN32) OR DEFINED(WIN64)} + {$DEFINE HASMSSQLCONNECTION} + {$DEFINE HASSYBASECONNECTION} {$ENDIF} -{$IF FPC_FULLVERSION >= 20603} - {$DEFINE HASMYSQL56CONNECTION} -{$ENDIF} -{$IF FPC_FULLVERSION >= 20701} - {$DEFINE HASMYSQL57CONNECTION} -{$ENDIF} +{$DEFINE HASMYSQL56CONNECTION} +{$DEFINE HASMYSQL57CONNECTION} {$mode objfpc}{$H+} diff --git a/components/fpvectorial/fpvectorial.pas b/components/fpvectorial/fpvectorial.pas index fd0a90600c..ef942412eb 100644 --- a/components/fpvectorial/fpvectorial.pas +++ b/components/fpvectorial/fpvectorial.pas @@ -4586,11 +4586,7 @@ begin ADest.Font.Bold := AFont.Bold; ADest.Font.Italic := AFont.Italic; ADest.Font.Underline := AFont.Underline; - {$IF (FPC_FULLVERSION<=20600) or (FPC_FULLVERSION=20602)} - ADest.Font.StrikeTrough := AFont.StrikeThrough; //old version with typo - {$ELSE} ADest.Font.StrikeThrough := AFont.StrikeThrough; - {$ENDIF} {$ifdef USE_LCL_CANVAS} ALCLDest.Font.Orientation := Round(AFont.Orientation * 10); // wp: was * 16 diff --git a/components/freetype/ttfile.pas b/components/freetype/ttfile.pas index 96a87bd590..7a134e9d93 100644 --- a/components/freetype/ttfile.pas +++ b/components/freetype/ttfile.pas @@ -364,19 +364,9 @@ const * ******************************************************************) procedure TT_Done_Stream( stream : TT_Stream ); - {$IF FPC_FULLVERSION<20701} - var - p: Pointer; - {$ENDIF} begin if stream.z = nil then exit; - {$IF FPC_FULLVERSION<20701} - {$HINT workaround for fpc bug 23868 when compiling with -O2} - p:=stream.z; - TFreeTypeStream(p).FUsed := false; - {$ELSE} TFreeTypeStream(stream.z).FUsed := false; - {$ENDIF} end; (******************************************************************* diff --git a/components/lazdebuggers/lazdebugtestbase/testapps/WatchesValuePrg.pas b/components/lazdebuggers/lazdebugtestbase/testapps/WatchesValuePrg.pas index e6504f5268..49be647cf5 100644 --- a/components/lazdebuggers/lazdebugtestbase/testapps/WatchesValuePrg.pas +++ b/components/lazdebuggers/lazdebugtestbase/testapps/WatchesValuePrg.pas @@ -344,20 +344,15 @@ type // recursive declaration TSize = record cx : Longint; cy : Longint; - public - {$if FPC_FULLVERSION >= 30000} - constructor Create(asz :TSize); - {$ENDIF} + public + constructor Create(asz :TSize); end; TFunc1 = function(SomeValue, Foo: Integer; Bar: Word; X: Byte): Boolean; TProc1 = procedure(); TMeth1 = function(AVal: Integer): Boolean of object; - {$if FPC_FULLVERSION >= 30000} PFuncSelfRef = ^TFuncSelfRef; TFuncSelfRef = function(SomeValue, Foo: PFuncSelfRef): PFuncSelfRef; - {$ENDIF} - // Recursive pointers TRecursePtrA1 = ^TRecursePtrA2; @@ -534,10 +529,7 @@ var MyStringList: TMyStringList; U8Data1, U8Data2: Utf8String; - - {$if FPC_FULLVERSION >= 30000} dummy1: PFuncSelfRef; - {$ENDIF} const (* LOCATION: global const *) @@ -607,10 +599,8 @@ var TEST_PREPOCESS(WatchesValuePrgIdent.inc, pre__=gv_ptrlist_, "_OP_=:PPointerList;//", "_O2_=:PPointerList;//" ) -{$if FPC_FULLVERSION >= 30000} constructor TSize.Create(asz :TSize); begin end; -{$endif} constructor TObjectCreate3Int64.Create; begin end; destructor TObjectCreate3Int64.Destroy; @@ -983,10 +973,7 @@ begin VarCastRecl4.l4 := 13; VarCastRecq2.q := $0010001100120013; VarCastRecq2.q2 := $0020002100220023; - - {$if FPC_FULLVERSION >= 30000} dummy1 := nil; - {$ENDIF} with ModifyTestByte do begin pre := qword($9696969696969696); post := $69; val := $01; end; with ModifyTestWord do begin pre := qword($9696969696969696); post := $69; val := $0101; end; diff --git a/components/lazreport/source/lr_dbset.pas b/components/lazreport/source/lr_dbset.pas index ff1627f1c1..531108b39f 100644 --- a/components/lazreport/source/lr_dbset.pas +++ b/components/lazreport/source/lr_dbset.pas @@ -153,9 +153,7 @@ procedure TfrDBDataSet.FreeBookMark(BM: Pointer); var ds: TDataset; begin - {$IFNDEF noautomatedbookmark} SetLength(TBookMark(BM),0); //decreases refcount of bookmark - {$ENDIF noautomatedbookmark} ds := DataSet; if Assigned(ds) and Assigned(BM) then ds.FreeBookmark(BM); diff --git a/components/lazreport/source/lr_rrect.pas b/components/lazreport/source/lr_rrect.pas index eb3ef3db4e..d3c1f93d3b 100644 --- a/components/lazreport/source/lr_rrect.pas +++ b/components/lazreport/source/lr_rrect.pas @@ -24,9 +24,7 @@ unit LR_RRect; interface {$I lr_vers.inc} -{$if (FPC_FULLVERSION>=20701)} {$Packset 1} -{$endif} uses Classes, SysUtils, LResources, GraphMath, diff --git a/components/lazreport/source/lr_vers.inc b/components/lazreport/source/lr_vers.inc index 420e3fd5d2..2d49171f40 100644 --- a/components/lazreport/source/lr_vers.inc +++ b/components/lazreport/source/lr_vers.inc @@ -56,11 +56,6 @@ {$ENDIF} {$DEFINE Delphi5} -{$if FPC_FULLVERSION<20701} - // in former FCL versions TBookmark was a simple pointer - {$DEFINE noautomatedbookmark} -{$endif} - {$IFDEF Darwin} {$DEFINE PRINTDIALOG_NATIVE_PRINTDIALOG} {$DEFINE PRINTDIALOG_DISABLE_PRINTER_PROPERTIES} diff --git a/components/lazutils/lazsysutils.pas b/components/lazutils/lazsysutils.pas index 33813179b2..881e2ecb5b 100644 --- a/components/lazutils/lazsysutils.pas +++ b/components/lazutils/lazsysutils.pas @@ -26,19 +26,14 @@ uses {$ELSE} {$IFnDEF HASAMIGA} Unix, BaseUnix, - {$If defined(Linux) and (FPC_FULLVERSION<30000)} - Linux, - {$EndIf} {$ENDIF} {$ENDIF} Classes; -{$IF FPC_FULLVERSION>=30000} function GetTickCount64: QWord; begin Result := SysUtils.GetTickCount64; end; -{$ENDIF} // ToDo: Move the code to 1 include file per platform {$IFDEF WINDOWS} @@ -49,15 +44,6 @@ begin windows.GetSystemTime(SystemTime{%H-}); result := systemTimeToDateTime(SystemTime); end; - -{$IF FPC_FULLVERSION<30000} -function GetTickCount64: QWord; -begin - // GetTickCount64 is better, but we need to check the Windows version to use it - Result := Windows.GetTickCount(); -end; -{$ENDIF FPC_FULLVERSION} - {$ELSE WINDOWS} {$IFDEF UNIX} Const @@ -115,39 +101,12 @@ begin result := systemTimeToDateTime(SystemTime); end; -{$IF FPC_FULLVERSION<30000} -{$IF defined(Linux) and not defined(GetTickCountTimeOfDay)} -function GetTickCount64: QWord; -var - tp: timespec; -begin - clock_gettime(CLOCK_MONOTONIC, @tp); // exists since Linux Kernel 2.6 - Result := (Int64(tp.tv_sec) * 1000) + (tp.tv_nsec div 1000000); -end; -{$ELSE} -function GetTickCount64: QWord; -var - tp: TTimeVal; -begin - fpgettimeofday(@tp, nil); - Result := (Int64(tp.tv_sec) * 1000) + (tp.tv_usec div 1000); -end; -{$ENDIF} -{$ENDIF FPC_FULLVERSION} - {$ELSE UNIX} // Not Windows and not UNIX, so just write the most trivial code until we have something better: function NowUTC: TDateTime; begin Result := Now; end; - -{$IF FPC_FULLVERSION<30000} -function GetTickCount64: QWord; -begin - Result := Trunc(Now * 24 * 60 * 60 * 1000); -end; -{$ENDIF FPC_FULLVERSION} {$ENDIF UNIX} {$ENDIF WINDOWS} diff --git a/components/lazutils/lazutf8.pas b/components/lazutils/lazutf8.pas index 118048ecf9..dd2a0fbcc0 100644 --- a/components/lazutils/lazutf8.pas +++ b/components/lazutils/lazutf8.pas @@ -258,11 +258,7 @@ begin if FNeedRTLAnsiValid then exit(FNeedRTLAnsi); {$IFDEF Windows} - {$IF FPC_FULLVERSION>=20701} - FNeedRTLAnsi:=DefaultSystemCodePage<>CP_UTF8; - {$ELSE} - FNeedRTLAnsi:=GetACP<>CP_UTF8; - {$ENDIF} + FNeedRTLAnsi:=DefaultSystemCodePage<>CP_UTF8; {$ELSE} FNeedRTLAnsi:=false; Lang := SysUtils.GetEnvironmentVariable('LC_ALL'); diff --git a/components/lazutils/winlazutf8.inc b/components/lazutils/winlazutf8.inc index c8d32c7ee1..5616a521d6 100644 --- a/components/lazutils/winlazutf8.inc +++ b/components/lazutils/winlazutf8.inc @@ -260,35 +260,9 @@ end; {$ENDIF WINCE} function GetEnvironmentVariableWide(const EnvVar: string): UnicodeString; -{$IF FPC_FULLVERSION>=30000} begin Result:=GetEnvironmentVariable(UTF8ToUTF16(EnvVar)); end; -{$ELSE} -var - s, upperenv : Unicodestring; - i : longint; - hp,p : pwidechar; -begin - Result:=''; - p:=GetEnvironmentStringsW; - hp:=p; - upperenv:=uppercase(envvar); - while hp^<>#0 do - begin - s:=hp; - i:=pos('=',s); - if uppercase(copy(s,1,i-1))=upperenv then - begin - Result:=copy(s,i+1,length(s)-i); - break; - end; - { next string entry} - hp:=hp+strlen(hp)+1; - end; - FreeEnvironmentStringsW(p); -end; -{$ENDIF} //*************** END WideString impementations diff --git a/components/sqldb/registersqldb.pas b/components/sqldb/registersqldb.pas index 0a565af7e6..2b9abbf375 100644 --- a/components/sqldb/registersqldb.pas +++ b/components/sqldb/registersqldb.pas @@ -37,29 +37,21 @@ unit registersqldb; {$DEFINE HASORACLECONNECTION} {$ENDIF} -{$IF FPC_FULLVERSION >= 20601} - // MS SQL Server and Sybase ASE connectors were introduced in the FPC 2.7 development branch, - // and backported to 2.6.1. Operating systems should match FPC packages\fcl-db\fpmake.pp - {$IF DEFINED(BEOS) OR DEFINED(HAIKU) OR DEFINED(LINUX) OR DEFINED(FREEBSD) OR DEFINED (NETBSD) OR DEFINED(OPENBSD) OR DEFINED(WIN32) OR DEFINED(WIN64)} - {$DEFINE HASMSSQLCONNECTION} - {$DEFINE HASSYBASECONNECTION} - {$ENDIF} +// MS SQL Server and Sybase ASE connectors were introduced in the FPC 2.7 development branch, +// and backported to 2.6.1. Operating systems should match FPC packages\fcl-db\fpmake.pp +{$IF DEFINED(BEOS) OR DEFINED(HAIKU) OR DEFINED(LINUX) OR DEFINED(FREEBSD) OR DEFINED (NETBSD) OR DEFINED(OPENBSD) OR DEFINED(WIN32) OR DEFINED(WIN64)} + {$DEFINE HASMSSQLCONNECTION} + {$DEFINE HASSYBASECONNECTION} {$ENDIF} -{$IF FPC_FULLVERSION >= 20602} // These were backported to FPC 2.6.2 - {$DEFINE HASFBADMIN} - {$DEFINE HASPQEVENT} - {$DEFINE HASFBEVENT} - {$DEFINE HASLIBLOADER} -{$ENDIF} +{$DEFINE HASFBADMIN} +{$DEFINE HASPQEVENT} +{$DEFINE HASFBEVENT} +{$DEFINE HASLIBLOADER} -{$IF FPC_FULLVERSION >= 20603} - {$DEFINE HASMYSQL56CONNECTION} -{$ENDIF} -{$IF FPC_FULLVERSION >= 20701} - {$DEFINE HASMYSQL57CONNECTION} -{$ENDIF} +{$DEFINE HASMYSQL56CONNECTION} +{$DEFINE HASMYSQL57CONNECTION} {$IF FPC_FULLVERSION >= 30202} {$DEFINE HASMYSQL80CONNECTION} {$ENDIF} diff --git a/components/sqldbrest/editor/schemaconns.pp b/components/sqldbrest/editor/schemaconns.pp index 49f2528c7f..282169a891 100644 --- a/components/sqldbrest/editor/schemaconns.pp +++ b/components/sqldbrest/editor/schemaconns.pp @@ -10,24 +10,18 @@ unit schemaconns; {$DEFINE HASSQLITE3CONNECTION} {$IF (FPC_FULLVERSION>=30002) or not defined(win64)} - {$DEFINE HASORACLECONNECTION} + {$DEFINE HASORACLECONNECTION} {$ENDIF} -{$IF FPC_FULLVERSION >= 20601} - // MS SQL Server and Sybase ASE connectors were introduced in the FPC 2.7 development branch, - // and backported to 2.6.1. Operating systems should match FPC packages\fcl-db\fpmake.pp - {$IF DEFINED(BEOS) OR DEFINED(HAIKU) OR DEFINED(LINUX) OR DEFINED(FREEBSD) OR DEFINED (NETBSD) OR DEFINED(OPENBSD) OR DEFINED(WIN32) OR DEFINED(WIN64)} - {$DEFINE HASMSSQLCONNECTION} - {$DEFINE HASSYBASECONNECTION} - {$ENDIF} +// MS SQL Server and Sybase ASE connectors were introduced in the FPC 2.7 development branch, +// and backported to 2.6.1. Operating systems should match FPC packages\fcl-db\fpmake.pp +{$IF DEFINED(BEOS) OR DEFINED(HAIKU) OR DEFINED(LINUX) OR DEFINED(FREEBSD) OR DEFINED (NETBSD) OR DEFINED(OPENBSD) OR DEFINED(WIN32) OR DEFINED(WIN64)} + {$DEFINE HASMSSQLCONNECTION} + {$DEFINE HASSYBASECONNECTION} {$ENDIF} -{$IF FPC_FULLVERSION >= 20603} - {$DEFINE HASMYSQL56CONNECTION} -{$ENDIF} -{$IF FPC_FULLVERSION >= 20701} - {$DEFINE HASMYSQL57CONNECTION} -{$ENDIF} +{$DEFINE HASMYSQL56CONNECTION} +{$DEFINE HASMYSQL57CONNECTION} {$mode objfpc}{$H+} diff --git a/components/synedit/lazsynimm.pas b/components/synedit/lazsynimm.pas index 31ba82e46b..c940ac58ea 100644 --- a/components/synedit/lazsynimm.pas +++ b/components/synedit/lazsynimm.pas @@ -13,11 +13,6 @@ uses SynEditMiscClasses, SynTextDrawer, SynEditPointClasses, SynEditMarkupSelection, SynEditMarkup, SynEditTypes, SynEditKeyCmds, LazSynEditText, SynEditTextBase; -{$IFDEF WINCE} {$IF (FPC_FULLVERSION < 20700)} -function ImmSetCompositionFontA(_himc:HIMC; lplf:LPLOGFONT):BOOL; external ImmDLL name 'ImmSetCompositionFontA'; -const - WM_IME_REQUEST = $0288; -{$ENDIF}{$ENDIF} type { LazSynWinIme } diff --git a/components/synedit/syncompletion.pas b/components/synedit/syncompletion.pas index 1ab8558f76..235982bcac 100644 --- a/components/synedit/syncompletion.pas +++ b/components/synedit/syncompletion.pas @@ -479,17 +479,13 @@ const implementation function IsIdentifierChar(p: PChar): boolean; inline; -{$IF FPC_FULLVERSION >= 20701} var u: UnicodeString; i: Integer; L: SizeUInt; -{$ENDIF} begin Result := p^ in ['a'..'z','A'..'Z','0'..'9','_']; if Result then exit; - - {$IF FPC_FULLVERSION >= 20701} if p^ <= #127 then exit; i := UTF8CodepointSize(p); SetLength(u, i); @@ -500,7 +496,6 @@ begin if L > 1 then Result := TCharacter.IsLetterOrDigit(u, 1); end; - {$ENDIF} end; { TSynBaseCompletionFormScrollBar } diff --git a/components/synedit/synedittextdoublewidthchars.pas b/components/synedit/synedittextdoublewidthchars.pas index 475898b4ab..50a4b2c307 100644 --- a/components/synedit/synedittextdoublewidthchars.pas +++ b/components/synedit/synedittextdoublewidthchars.pas @@ -427,11 +427,7 @@ begin dec(PWidths); {$IFDEF SynForceDoubeWidthHack} - {$IF FPC_FULLVERSION>=20701} if (DefaultSystemCodePage = 932) {Japanese} - {$ELSE} - if (GetACP = 932) {Japanese} - {$ENDIF} then begin for i := 0 to LineLen - 1 do begin inc(Line); diff --git a/components/vlc/reglazvlc.pas b/components/vlc/reglazvlc.pas index 5254062eeb..81919dfa40 100644 --- a/components/vlc/reglazvlc.pas +++ b/components/vlc/reglazvlc.pas @@ -1,9 +1,5 @@ unit reglazvlc; -{$IF FPC_FULLVERSION<20701} -{$ERROR needs at least FPC 2.7.1} -{$ENDIF} - {$mode objfpc}{$H+} interface diff --git a/components/wiki/test/wikihelpmanager.pas b/components/wiki/test/wikihelpmanager.pas index a4a7a6ed8b..eb654cb63d 100644 --- a/components/wiki/test/wikihelpmanager.pas +++ b/components/wiki/test/wikihelpmanager.pas @@ -1248,9 +1248,6 @@ var StartTime: TDateTime; EndTime: TDateTime; begin - {$IF FPC_FULLVERSION<30000} - CurrentThread:=Self; - {$ENDIF} try Files:=nil; try @@ -1301,9 +1298,6 @@ begin end; finally Scanned; - {$IF FPC_FULLVERSION<30000} - CurrentThread:=nil; - {$ENDIF} end; end; @@ -1547,11 +1541,7 @@ begin FScanThread:=TWikiHelpThread.Create(true); FScanThread.FreeOnTerminate:=true; FScanThread.Help:=Self; - {$IF FPC_FULLVERSION<=20403} - FScanThread.Resume; - {$ELSE} FScanThread.Start; - {$ENDIF} finally LeaveCritSect; end; diff --git a/examples/cleandir/cleandirs.lpr b/examples/cleandir/cleandirs.lpr index c8500a81a5..fde79da0dc 100644 --- a/examples/cleandir/cleandirs.lpr +++ b/examples/cleandir/cleandirs.lpr @@ -24,9 +24,6 @@ Uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} - {$IF FPC_FULLVERSION<20602} - {$ERROR this example requires at least fpc 2.6.2} - {$ENDIF} daemonapp, lazdaemonapp, sysutils { add your units here }, svcmap, svccleandirs, dircleaner; diff --git a/examples/database/mssql/mssqlconnsample.lpr b/examples/database/mssql/mssqlconnsample.lpr index 182f728976..cbc1f9fd28 100644 --- a/examples/database/mssql/mssqlconnsample.lpr +++ b/examples/database/mssql/mssqlconnsample.lpr @@ -8,10 +8,6 @@ See readme.txt for details on required drivers. {$mode objfpc}{$H+} -{$IF FPC_FULLVERSION<20601} -{$ERROR this example requires at least fpc 2.6.1} -{$ENDIF} - uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, diff --git a/ide/include/ide.inc b/ide/include/ide.inc index 2596bd2e23..3d500994bd 100644 --- a/ide/include/ide.inc +++ b/ide/include/ide.inc @@ -48,13 +48,7 @@ {$ENDIF} {$ENDIF} -{$IF FPC_FULLVERSION<20700} -// fpc 2.6.2 and 2.6.3 have a bug with -O2 and for..in -// see http://bugs.freepascal.org/view.php?id=25588 - {$OPTIMIZATION NOSTACKFRAME} -{$ENDIF} - -{$IF defined(Windows) and defined(HEAPTRC_WINDOW) and (FPC_FULLVERSION>=20701)} +{$IF defined(Windows) and defined(HEAPTRC_WINDOW)} {$DEFINE EnableRedirectStdErr} {$ENDIF} diff --git a/ide/lazadvancedipc.pp b/ide/lazadvancedipc.pp index d3e71dc57b..14da764886 100644 --- a/ide/lazadvancedipc.pp +++ b/ide/lazadvancedipc.pp @@ -34,11 +34,7 @@ uses {$IFDEF UNIX} baseunix, {$endif} - sysutils, Classes, LazFileUtils - {$IF FPC_FULLVERSION<20701} - ,LazSysUtils - {$ENDIF} - ; + sysutils, Classes, LazFileUtils; const HEADER_VERSION = 2; @@ -184,7 +180,7 @@ resourcestring implementation type - TIPCSearchRec = {$IF FPC_FULLVERSION>=20701}TRawByteSearchRec{$ELSE}TSearchRec{$ENDIF}; + TIPCSearchRec = TRawByteSearchRec; const {$IFDEF UNIX} diff --git a/ide/lazbuild.lpr b/ide/lazbuild.lpr index 719c744244..3bbb0495da 100644 --- a/ide/lazbuild.lpr +++ b/ide/lazbuild.lpr @@ -279,9 +279,6 @@ begin DebugLn(['TLazBuildApplication.OnCodeBufferEncodeSaving Filename=',Code.Filename,' Mem=',Code.MemEncoding,' to Disk=',Code.DiskEncoding]); {$ENDIF} Source:=ConvertEncoding(Source,Code.MemEncoding,Code.DiskEncoding); - {$IF FPC_FULLVERSION >= 20701} - //SetCodePage(Source,CP_ACP); - {$ENDIF} end; end; diff --git a/ide/raw_window.pas b/ide/raw_window.pas index f9419b0746..627d970200 100644 --- a/ide/raw_window.pas +++ b/ide/raw_window.pas @@ -29,20 +29,17 @@ interface {$IFDEF Windows} {$IFDEF HEAPTRC_WINDOW} -{$IF FPC_FULLVERSION>=20701} uses SysUtils, Windows, Messages; procedure ShowWindow(AStr : String); {$ENDIF} {$ENDIF} -{$ENDIF} implementation {$IFDEF Windows} {$IFDEF HEAPTRC_WINDOW} -{$IF FPC_FULLVERSION>=20701} Var WndHandle, ButtonHandle, @@ -191,7 +188,6 @@ Begin end; {$ENDIF} {$ENDIF} -{$ENDIF} end. diff --git a/lcl/dbgrids.pas b/lcl/dbgrids.pas index 0633dd86bf..d8c644b9ae 100644 --- a/lcl/dbgrids.pas +++ b/lcl/dbgrids.pas @@ -36,10 +36,6 @@ uses LCLIntf, LCLType, LMessages, LResources, Controls, StdCtrls, Graphics, Grids, Dialogs, Themes, Variants, Clipbrd, ImgList, Laz2_XMLCfg; -{$if FPC_FULLVERSION<20701} - {$DEFINE noautomatedbookmark} -{$endif} - const DEFINDICATORCOLWIDTH = 12; @@ -4614,15 +4610,11 @@ begin if Find(Bookmark, Index) then begin FDataset.FreeBookmark(Bookmark); - {$ifndef noautomatedbookmark} SetLength(TBookmark(Bookmark),0); // decrease reference count - {$endif noautomatedbookmark} if not AValue then begin FDataset.FreeBookmark(Pointer(Items[Index])); - {$ifndef noautomatedbookmark} Bookmark := FList[Index]; SetLength(TBookmark(Bookmark),0); // decrease reference count - {$endif noautomatedbookmark} FList.Delete(Index); FGrid.Invalidate; end; @@ -4635,9 +4627,7 @@ begin end else begin FDataset.FreeBookmark(Bookmark); - {$ifndef noautomatedbookmark} SetLength(TBookmark(Bookmark),0); // decrease reference count - {$endif} end; end; end; @@ -4704,9 +4694,7 @@ end; procedure TBookmarkList.Clear; var i: Integer; - {$ifndef noautomatedbookmark} Bookmark: Pointer; - {$endif} begin for i:=0 to FList.Count-1 do begin @@ -4714,10 +4702,8 @@ begin DebugLn('%s.Clear', [ClassName]); {$endif} FDataset.FreeBookmark(Items[i]); - {$ifndef noautomatedbookmark} Bookmark := FList[i]; SetLength(TBookmark(Bookmark),0); // decrease reference count - {$endif noautomatedbookmark} end; FList.Clear; FGrid.Invalidate; @@ -4726,21 +4712,15 @@ end; procedure TBookmarkList.Delete; var i: Integer; - {$ifndef noautomatedbookmark} Bookmark: Pointer; - {$endif} begin {$ifdef dbgDBGrid} DebugLn('%s.Delete', [ClassName]); {$endif} for i := FList.Count-1 downto 0 do begin FDataset.GotoBookmark(Items[i]); - {$ifndef noautomatedbookmark} Bookmark := FList[i]; SetLength(TBookmark(Bookmark),0); // decrease reference count - {$else} - FDataset.FreeBookmark(Items[i]); - {$endif noautomatedbookmark} FDataset.Delete; FList.Delete(i); end; @@ -4819,9 +4799,7 @@ end; function TBookmarkList.Refresh: boolean; var i: LongInt; - {$ifndef noautomatedbookmark} Bookmark: Pointer; - {$endif} begin {$ifdef dbgDBGrid} DebugLn('%s.Refresh', [ClassName]); @@ -4831,10 +4809,8 @@ begin if not FDataset.BookmarkValid(TBookMark(Items[i])) then begin Result := True; FDataset.FreeBookmark(Items[i]); - {$ifndef noautomatedbookmark} Bookmark := FList[i]; SetLength(TBookmark(Bookmark),0); // decrease reference count - {$endif noautomatedbookmark} Flist.Delete(i); end; if Result then diff --git a/lcl/graphics.pp b/lcl/graphics.pp index 853914d1b0..994847b97d 100644 --- a/lcl/graphics.pp +++ b/lcl/graphics.pp @@ -25,18 +25,9 @@ interface {$ASSERTIONS ON} {$endif} -{$IF FPC_FULLVERSION>=20601} {$DEFINE HasFPCanvas1} -{$ENDIF} - -{$IF FPC_FULLVERSION>=20603} {$DEFINE HasFPEndCap} -{$ENDIF} - -{$IF FPC_FULLVERSION>=20603} {$DEFINE HasFPJoinStyle} -{$ENDIF} - {$IF FPC_FULLVERSION>=30203} {$DEFINE UseSystemUITypes} {$ENDIF} diff --git a/lcl/imglist.pp b/lcl/imglist.pp index a0c6f317ac..3f4884db84 100644 --- a/lcl/imglist.pp +++ b/lcl/imglist.pp @@ -334,8 +334,7 @@ type procedure ReadData(AStream: TStream); virtual; procedure WriteAdvData(AStream: TStream); virtual; procedure ReadAdvData(AStream: TStream); virtual; - function Equals(Obj: TObject): boolean; - {$IF FPC_FULLVERSION>=20402}override;{$ENDIF} + function Equals(Obj: TObject): boolean; override; procedure BeginUpdate; procedure EndUpdate; diff --git a/lcl/include/canvas.inc b/lcl/include/canvas.inc index 99d02e5b19..04adda5163 100644 --- a/lcl/include/canvas.inc +++ b/lcl/include/canvas.inc @@ -1583,9 +1583,7 @@ destructor TCanvas.Destroy; begin //DebugLn('[TCanvas.Destroy] ',ClassName,' Self=',DbgS(Self)); Handle := 0; - {$IF FPC_FULLVERSION>=20602} FreeThenNil(FClipRegion); {issue #24980 looks like TFPCustomCanvas bug} - {$ENDIF} FreeThenNil(FRegion); FreeThenNil(FSavedHandleStates); if FLock <> 0 then diff --git a/lcl/include/imglist.inc b/lcl/include/imglist.inc index e5ee413792..abfce5fbad 100644 --- a/lcl/include/imglist.inc +++ b/lcl/include/imglist.inc @@ -2392,11 +2392,7 @@ begin CurStream.Free; end; end else - {$IF FPC_FULLVERSION>20402} Result:=inherited Equals(Obj); - {$ELSE} - Result:=false; - {$ENDIF} end; function TCustomImageList.FindResolution(AImageWidth: Integer; out diff --git a/lcl/include/lcl_defines.inc b/lcl/include/lcl_defines.inc index 786feb1b8c..916b7c1088 100644 --- a/lcl/include/lcl_defines.inc +++ b/lcl/include/lcl_defines.inc @@ -3,10 +3,8 @@ {$DEFINE UseCLDefault} {$WARN SYMBOL_PLATFORM OFF} -{$IF FPC_FULLVERSION>=20701} - // NOREMOVEEMPTYPROCS bites double inheritance in wslclclasses.pp - {$OPTIMIZATION NOREMOVEEMPTYPROCS} -{$ENDIF} +// NOREMOVEEMPTYPROCS bites double inheritance in wslclclasses.pp +{$OPTIMIZATION NOREMOVEEMPTYPROCS} {$IFNDEF FPC_FULLVERSION} {$DEFINE FPDOC} diff --git a/lcl/include/tiffimage.inc b/lcl/include/tiffimage.inc index ef9fef8792..e8455633eb 100644 --- a/lcl/include/tiffimage.inc +++ b/lcl/include/tiffimage.inc @@ -25,11 +25,7 @@ var D, T: TDateTime; S: String; YY, MM, DD, HH, NN, SS: Integer; - {$IF FPC_FULLVERSION>=20601} IFD: TTiffIFD; - {$ELSE} - IFD: TTiffIDF; - {$ENDIF} begin IFD:=TFPReaderTiff(AReader).FirstImg; FArtist := IFD.Artist; diff --git a/lcl/interfaces/carbon/carbonstrings.pp b/lcl/interfaces/carbon/carbonstrings.pp index a8ca7630cc..0a705d41c3 100644 --- a/lcl/interfaces/carbon/carbonstrings.pp +++ b/lcl/interfaces/carbon/carbonstrings.pp @@ -18,10 +18,6 @@ interface // defines {$I carbondefines.inc} -{$if (FPC_FULLVERSION>=20701) OR (FPC_FULLVERSION>=20603)} -{$define HAS_INHERITED_INSERTITEM} -{$endif} - uses // rtl+ftl Classes, SysUtils, @@ -40,10 +36,6 @@ type FOwner: TCarbonComboBox; // Carbon combo box control owning strings protected procedure Put(Index: Integer; const S: string); override; - {$IFNDEF HAS_INHERITED_INSERTITEM} - // before fpc 2.7.1 InsertItem(Index,S) did not call InsertItem(Index,S,nil) - procedure InsertItem(Index: Integer; const S: string); override; - {$ENDIF} procedure InsertItem(Index: Integer; const S: string; O: TObject); override; public constructor Create(AOwner: TCarbonComboBox); @@ -63,10 +55,6 @@ type FWinControl: TWinControl; protected procedure Put(Index: Integer; const S: string); override; - {$IFNDEF HAS_INHERITED_INSERTITEM} - // before fpc 2.7.1 InsertItem(Index,S) did not call InsertItem(Index,S,nil) - procedure InsertItem(Index: Integer; const S: string); override; - {$ENDIF} procedure InsertItem(Index: Integer; const S: string; O: TObject); override; public constructor Create(AOwner: TCarbonListBox; AWinControl: TWinControl); @@ -125,22 +113,6 @@ begin FOwner.Insert(Index, S); end; -{$IFNDEF HAS_INHERITED_INSERTITEM} -{------------------------------------------------------------------------------ - Method: TCarbonComboBoxStrings.InsertItem - Params: Index - Line index - S - Text to insert - - Inserts the text on line with the specified index - ------------------------------------------------------------------------------} -procedure TCarbonComboBoxStrings.InsertItem(Index: Integer; const S: string); -begin - inherited InsertItem(Index, S); - - FOwner.Insert(Index, S); -end; -{$ENDIF} - {------------------------------------------------------------------------------ Method: TCarbonComboBoxStrings.InsertItem Params: Index - Line index @@ -240,22 +212,6 @@ begin FOwner.UpdateItem(Index); end; -{$IFNDEF HAS_INHERITED_INSERTITEM} -{------------------------------------------------------------------------------ - Method: TCarbonListBoxStrings.InsertItem - Params: Index - Line index - S - Text to insert - - Inserts the text on line with the specified index - ------------------------------------------------------------------------------} -procedure TCarbonListBoxStrings.InsertItem(Index: Integer; const S: string); -begin - inherited InsertItem(Index, S); - - FOwner.InsertItem(Index); // Without this call, dynamically adding items won't work -end; -{$ENDIF} - {------------------------------------------------------------------------------ Method: TCarbonListBoxStrings.InsertItem Params: Index - Line index diff --git a/lcl/interfaces/customdrawn/customdrawnwinapi.inc b/lcl/interfaces/customdrawn/customdrawnwinapi.inc index c5c241df1c..d64c094dc0 100644 --- a/lcl/interfaces/customdrawn/customdrawnwinapi.inc +++ b/lcl/interfaces/customdrawn/customdrawnwinapi.inc @@ -4071,11 +4071,7 @@ begin TM.tmBreakChar := '?'; TM.tmItalic := Ord(lFont.Italic); TM.tmUnderlined := Ord(lFont.Underline); - {$IF (FPC_FULLVERSION<=20600) or (FPC_FULLVERSION=20602)} - TM.tmStruckOut := Ord(lFont.StrikeTrough); //old version with typo - {$ELSE} TM.tmStruckOut := Ord(lFont.StrikeThrough); - {$ENDIF} { Defaults to a TrueType font. Note that the meaning of the FIXED_PITCH constant is the opposite of diff --git a/lcl/interfaces/gtk2/gtk2defines.inc b/lcl/interfaces/gtk2/gtk2defines.inc index 31b6a667a5..32f40b0dda 100644 --- a/lcl/interfaces/gtk2/gtk2defines.inc +++ b/lcl/interfaces/gtk2/gtk2defines.inc @@ -96,7 +96,5 @@ // See http://bugs.freepascal.org/view.php?id=18966 {$define Gtk2CallMouseDownBeforeContext} -{$IF FPC_FULLVERSION>=20701} - {$OPTIMIZATION NOREMOVEEMPTYPROCS} -{$ENDIF} +{$OPTIMIZATION NOREMOVEEMPTYPROCS} diff --git a/lcl/interfaces/gtk2/gtk2extrah.inc b/lcl/interfaces/gtk2/gtk2extrah.inc index b7d7cb14c6..50fa476b52 100644 --- a/lcl/interfaces/gtk2/gtk2extrah.inc +++ b/lcl/interfaces/gtk2/gtk2extrah.inc @@ -15,9 +15,6 @@ uses xlib, x, {$endif} glib2, gdk2, gtk2, gtk2ext, - {$IF FPC_FULLVERSION<20600} - gdk2pixbuf, - {$ENDIF} {$ifdef HasGdk2X} gdk2x, {$endif} @@ -45,12 +42,6 @@ const GTK_RESPONSE_LCL_IGNORE = -13; GTK_RESPONSE_LCL_NOTOALL = -14; -{$IF FPC_FULLVERSION<20600} -// missing declarations in fpc 2.2 -const - GTK_CELL_RENDERER_FOCUSED = 1 shl 4; -{$ENDIF} - {$IFNDEF MSWINDOWS} // this is required for compilation under windows {$if defined(HasX)} // This is required for compilation under Mac OS X var @@ -83,35 +74,6 @@ type PANGO_GRAVITY_AUTO ); -{$IF FPC_FULLVERSION<20600} -// ----------------- this pango symbols can be removed after fpc 2.2.4 -// pango 1.6 - PPangoMatrix = ^TPangoMatrix; - TPangoMatrix = record - xx: double; - xy: double; - yx: double; - yy: double; - x0: double; - y0: double; - end; - -// pango 1.8 - - TPangoRenderer = pointer; - PPangoRenderer = ^TPangoRenderer; - TPangoRenderPart = ( - PANGO_RENDER_PART_FOREGROUND, - PANGO_RENDER_PART_BACKGROUND, - PANGO_RENDER_PART_UNDERLINE, - PANGO_RENDER_PART_STRIKETHROUGH - ); - -procedure pango_renderer_draw_layout(renderer: PPangoRenderer; layout: PPangoLayout; x, y: Integer); cdecl; external pangolib; -procedure pango_matrix_translate(matrix: PPangoMatrix; tx, ty: double); cdecl; external pangolib; -procedure pango_matrix_rotate(matrix: PPangoMatrix; degrees: double); cdecl; external pangolib; -{$ENDIF} - // ------------------end of symbold to remove -------------------------- function pango_context_get_gravity(Context: PPangoContext): TPangoGravity; cdecl; external pangolib; @@ -124,32 +86,13 @@ function pango_font_description_get_gravity(desc: PPangoFontDescription): TPango procedure pango_font_description_set_gravity(desc: PPangoFontDescription; gravity: TPangoGravity); cdecl; external pangolib; function pango_attr_gravity_new(gravity: TPangoGravity): PPangoAttribute; cdecl; external pangolib; - function pango_version_check(required_major, required_minor, required_micro: integer): PChar; cdecl; external pangolib; - procedure pango_extents_to_pixels(inclusive: PPangoRectangle; nearest: PPangoRectangle); cdecl; external pangolib; -{$IF FPC_FULLVERSION<20501} -function pango_font_family_is_monospace(family:PPangoFontFamily):gboolean; cdecl; external pangolib; -{$ENDIF} - - // - - - - - - - - - gtk extras - - - - - - - - - // ----------------- this gtk symbols can be removed after fpc 2.2.4 -{$IF FPC_FULLVERSION<20600} -// gtk 2.2 -function gtk_tree_path_new_from_indices(first_index: gint): PGtkTreePath; cdecl; varargs; external gtklib name 'gtk_tree_path_new_from_indices'; - -// gtk 2.4 -procedure gtk_toolbar_insert(toolbar: PGtkToolBar; item: PGtkToolItem; pos: gint); cdecl; external gtklib name 'gtk_toolbar_insert'; -procedure gtk_event_box_set_visible_window(event_box: PGtkEventBox; visible_window: gboolean); cdecl; external gtklib name 'gtk_event_box_set_visible_window'; -procedure gtk_event_box_set_above_child(event_box: PGtkEventBox; visible_window: gboolean); cdecl; external gtklib name 'gtk_event_box_set_above_child'; -procedure gtk_draw_insertion_cursor(widget:PGtkWidget; drawable:PGdkDrawable; area:PGdkRectangle; location:PGdkRectangle; is_primary:gboolean; - direction:TGtkTextDirection; draw_arrow:gboolean); cdecl; external gtklib; -{$ENDIF} - // gtk 2.6 type PGtkCellView = ^TGtkCellView; @@ -278,9 +221,6 @@ const procedure gtk_menu_bar_set_pack_direction(menubar : PGtkMenuBar; pack_dir : TGtkPackDirection); cdecl; external gtklib; procedure gtk_menu_bar_set_child_pack_direction(menubar : PGtkMenuBar; pack_dir : TGtkPackDirection); cdecl; external gtklib; -{$IF FPC_FULLVERSION<20600} -procedure gtk_file_chooser_set_do_overwrite_confirmation(chooser:PGtkFileChooser; do_overwrite_confirmation:gboolean); cdecl; external gtklib; -{$ENDIF} procedure gtk_icon_view_scroll_to_path(icon_view: PGtkIconView; path: PGtkTreePath; use_align: gboolean; row_align: gfloat; col_align: gfloat); cdecl; external gtklib; function gtk_icon_view_get_cursor(icon_view: PGtkIconView; var path: PGtkTreePath; var cell: PGtkCellRenderer): gboolean; cdecl; external gtklib; procedure gtk_icon_view_set_cursor(icon_view: PGtkIconView; path: PGtkTreePath; cell: PGtkCellRenderer; start_editing: gboolean); cdecl; external gtklib; diff --git a/lcl/interfaces/qt/qtprivate.pp b/lcl/interfaces/qt/qtprivate.pp index 1332bd85ad..0790f4305e 100644 --- a/lcl/interfaces/qt/qtprivate.pp +++ b/lcl/interfaces/qt/qtprivate.pp @@ -21,12 +21,6 @@ interface {$I qtdefines.inc} -// todo: check if build macros can handle this and define it -// in package LCL instead (it's needed for several widgetsets) -{$if (FPC_FULLVERSION>=20701) OR (FPC_FULLVERSION>=20603)} -{$define HAS_INHERITED_INSERTITEM} -{$endif} - uses // Bindings qt4, @@ -50,9 +44,6 @@ type procedure SetSorted(AValue: Boolean); protected procedure Put(Index: Integer; const S: string); override; - {$IFNDEF HAS_INHERITED_INSERTITEM} - procedure InsertItem(Index: Integer; const S: string); override; - {$ENDIF} procedure InsertItem(Index: Integer; const S: string; O: TObject); override; public constructor Create(AWinControl: TWinControl; AOwner: TQtComboBox); @@ -80,9 +71,6 @@ type FOwner: TQtListWidget; protected procedure Put(Index: Integer; const S: string); override; - {$IFNDEF HAS_INHERITED_INSERTITEM} - procedure InsertItem(Index: Integer; const S: string); override; - {$ENDIF} procedure InsertItem(Index: Integer; const S: string; O: TObject); override; public constructor Create(AWinControl: TWinControl; AOwner: TQtListWidget); @@ -509,27 +497,6 @@ begin FOwner.EndUpdate; end; -{$IFNDEF HAS_INHERITED_INSERTITEM} -procedure TQtComboStrings.InsertItem(Index: Integer; const S: string); -var - FSavedIndex: Integer; - FSavedText: WideString; -begin - inherited InsertItem(Index, S); - FOwner.BeginUpdate; - FSavedText := FOwner.getText; - FSavedIndex := FOwner.currentIndex; - FOwner.insertItem(Index, S); - if FOwner.getEditable then - begin - if (FSavedIndex <> FOwner.currentIndex) then - FOwner.setCurrentIndex(FSavedIndex); - FOwner.setText(FSavedText); - end; - FOwner.EndUpdate; -end; -{$ENDIF} - procedure TQtComboStrings.InsertItem(Index: Integer; const S: string; O: TObject); var FSavedIndex: Integer; @@ -724,26 +691,7 @@ begin FOwner.EndUpdate; end; end; -{$IFNDEF HAS_INHERITED_INSERTITEM} -procedure TQtListStrings.InsertItem(Index: Integer; const S: string); -begin - inherited InsertItem(Index, S); - if Assigned(FWinControl) and (FWinControl.HandleAllocated) then - begin - FOwner.BeginUpdate; - FOwner.insertItem(Index, S); - if FOwner is TQtCheckListBox then - begin - FOwner.ItemFlags[Index] := FOwner.ItemFlags[Index] or QtItemIsUserCheckable; - if TQtCheckListBox(FOwner).AllowGrayed then - FOwner.ItemFlags[Index] := FOwner.ItemFlags[Index] or QtItemIsTristate - else - FOwner.ItemFlags[Index] := FOwner.ItemFlags[Index] and not QtItemIsTristate; - end; - FOwner.EndUpdate; - end; -end; -{$ENDIF} + procedure TQtListStrings.InsertItem(Index: Integer; const S: string; O: TObject); begin inherited InsertItem(Index, S, O); diff --git a/lcl/interfaces/qt5/qtprivate.pp b/lcl/interfaces/qt5/qtprivate.pp index 141d878037..9a6c3309ce 100644 --- a/lcl/interfaces/qt5/qtprivate.pp +++ b/lcl/interfaces/qt5/qtprivate.pp @@ -21,12 +21,6 @@ interface {$I qtdefines.inc} -// todo: check if build macros can handle this and define it -// in package LCL instead (it's needed for several widgetsets) -{$if (FPC_FULLVERSION>=20701) OR (FPC_FULLVERSION>=20603)} -{$define HAS_INHERITED_INSERTITEM} -{$endif} - uses // Bindings qt5, @@ -50,9 +44,6 @@ type procedure SetSorted(AValue: Boolean); protected procedure Put(Index: Integer; const S: string); override; - {$IFNDEF HAS_INHERITED_INSERTITEM} - procedure InsertItem(Index: Integer; const S: string); override; - {$ENDIF} procedure InsertItem(Index: Integer; const S: string; O: TObject); override; public constructor Create(AWinControl: TWinControl; AOwner: TQtComboBox); @@ -80,9 +71,6 @@ type FOwner: TQtListWidget; protected procedure Put(Index: Integer; const S: string); override; - {$IFNDEF HAS_INHERITED_INSERTITEM} - procedure InsertItem(Index: Integer; const S: string); override; - {$ENDIF} procedure InsertItem(Index: Integer; const S: string; O: TObject); override; public constructor Create(AWinControl: TWinControl; AOwner: TQtListWidget); @@ -512,27 +500,6 @@ begin FOwner.EndUpdate; end; -{$IFNDEF HAS_INHERITED_INSERTITEM} -procedure TQtComboStrings.InsertItem(Index: Integer; const S: string); -var - FSavedIndex: Integer; - FSavedText: WideString; -begin - inherited InsertItem(Index, S); - FOwner.BeginUpdate; - FSavedText := FOwner.getText; - FSavedIndex := FOwner.currentIndex; - FOwner.insertItem(Index, S); - if FOwner.getEditable then - begin - if (FSavedIndex <> FOwner.currentIndex) then - FOwner.setCurrentIndex(FSavedIndex); - FOwner.setText(FSavedText); - end; - FOwner.EndUpdate; -end; -{$ENDIF} - procedure TQtComboStrings.InsertItem(Index: Integer; const S: string; O: TObject); var FSavedIndex: Integer; @@ -728,26 +695,7 @@ begin FOwner.EndUpdate; end; end; -{$IFNDEF HAS_INHERITED_INSERTITEM} -procedure TQtListStrings.InsertItem(Index: Integer; const S: string); -begin - inherited InsertItem(Index, S); - if Assigned(FWinControl) and (FWinControl.HandleAllocated) then - begin - FOwner.BeginUpdate; - FOwner.insertItem(Index, S); - if FOwner is TQtCheckListBox then - begin - FOwner.ItemFlags[Index] := FOwner.ItemFlags[Index] or QtItemIsUserCheckable; - if TQtCheckListBox(FOwner).AllowGrayed then - FOwner.ItemFlags[Index] := FOwner.ItemFlags[Index] or QtItemIsTristate - else - FOwner.ItemFlags[Index] := FOwner.ItemFlags[Index] and not QtItemIsTristate; - end; - FOwner.EndUpdate; - end; -end; -{$ENDIF} + procedure TQtListStrings.InsertItem(Index: Integer; const S: string; O: TObject); begin inherited InsertItem(Index, S, O); diff --git a/lcl/interfaces/qt6/qtprivate.pp b/lcl/interfaces/qt6/qtprivate.pp index c35263c664..42d06032b8 100644 --- a/lcl/interfaces/qt6/qtprivate.pp +++ b/lcl/interfaces/qt6/qtprivate.pp @@ -21,12 +21,6 @@ interface {$I qtdefines.inc} -// todo: check if build macros can handle this and define it -// in package LCL instead (it's needed for several widgetsets) -{$if (FPC_FULLVERSION>=20701) OR (FPC_FULLVERSION>=20603)} -{$define HAS_INHERITED_INSERTITEM} -{$endif} - uses // Bindings qt6, @@ -50,9 +44,6 @@ type procedure SetSorted(AValue: Boolean); protected procedure Put(Index: Integer; const S: string); override; - {$IFNDEF HAS_INHERITED_INSERTITEM} - procedure InsertItem(Index: Integer; const S: string); override; - {$ENDIF} procedure InsertItem(Index: Integer; const S: string; O: TObject); override; public constructor Create(AWinControl: TWinControl; AOwner: TQtComboBox); @@ -80,9 +71,6 @@ type FOwner: TQtListWidget; protected procedure Put(Index: Integer; const S: string); override; - {$IFNDEF HAS_INHERITED_INSERTITEM} - procedure InsertItem(Index: Integer; const S: string); override; - {$ENDIF} procedure InsertItem(Index: Integer; const S: string; O: TObject); override; public constructor Create(AWinControl: TWinControl; AOwner: TQtListWidget); @@ -512,27 +500,6 @@ begin FOwner.EndUpdate; end; -{$IFNDEF HAS_INHERITED_INSERTITEM} -procedure TQtComboStrings.InsertItem(Index: Integer; const S: string); -var - FSavedIndex: Integer; - FSavedText: WideString; -begin - inherited InsertItem(Index, S); - FOwner.BeginUpdate; - FSavedText := FOwner.getText; - FSavedIndex := FOwner.currentIndex; - FOwner.insertItem(Index, S); - if FOwner.getEditable then - begin - if (FSavedIndex <> FOwner.currentIndex) then - FOwner.setCurrentIndex(FSavedIndex); - FOwner.setText(FSavedText); - end; - FOwner.EndUpdate; -end; -{$ENDIF} - procedure TQtComboStrings.InsertItem(Index: Integer; const S: string; O: TObject); var FSavedIndex: Integer; @@ -728,26 +695,7 @@ begin FOwner.EndUpdate; end; end; -{$IFNDEF HAS_INHERITED_INSERTITEM} -procedure TQtListStrings.InsertItem(Index: Integer; const S: string); -begin - inherited InsertItem(Index, S); - if Assigned(FWinControl) and (FWinControl.HandleAllocated) then - begin - FOwner.BeginUpdate; - FOwner.insertItem(Index, S); - if FOwner is TQtCheckListBox then - begin - FOwner.ItemFlags[Index] := FOwner.ItemFlags[Index] or QtItemIsUserCheckable; - if TQtCheckListBox(FOwner).AllowGrayed then - FOwner.ItemFlags[Index] := FOwner.ItemFlags[Index] or QtItemIsTristate - else - FOwner.ItemFlags[Index] := FOwner.ItemFlags[Index] and not QtItemIsTristate; - end; - FOwner.EndUpdate; - end; -end; -{$ENDIF} + procedure TQtListStrings.InsertItem(Index: Integer; const S: string; O: TObject); begin inherited InsertItem(Index, S, O); diff --git a/lcl/interfaces/win32/win32callback.inc b/lcl/interfaces/win32/win32callback.inc index c7104fb338..f582cfba22 100644 --- a/lcl/interfaces/win32/win32callback.inc +++ b/lcl/interfaces/win32/win32callback.inc @@ -1293,11 +1293,7 @@ procedure TWindowProcHelper.DoMsgChar(var WinResult: LResult); begin OrgCharCode := Word(WParam); // Process surrogate pairs later - {$IF FPC_FULLVERSION>=30000} if TCharacter.IsSurrogate(WideChar(OrgCharCode)) then - {$ELSE} - if False then - {$ENDIF} WinProcess := True // first send a IntfUTF8KeyPress to the LCL // if the key was not handled send a CN_CHAR for AnsiChar<=#127 diff --git a/lcl/interfaces/win32/win32int.pp b/lcl/interfaces/win32/win32int.pp index 18de1fe852..d6a0dcfe55 100644 --- a/lcl/interfaces/win32/win32int.pp +++ b/lcl/interfaces/win32/win32int.pp @@ -31,9 +31,7 @@ interface uses Windows, // keep as first Classes, SysUtils, RtlConsts, ActiveX, MultiMon, CommCtrl, UxTheme, ctypes, DwmApi, - {$IF FPC_FULLVERSION>=30000} character, - {$ENDIF} // LCL LCLPlatformDef, InterfaceBase, LCLIntf, LclProc, LCLType, LMessages, Controls, Buttons, Forms, Dialogs, StdCtrls, diff --git a/lcl/intfgraphics.pas b/lcl/intfgraphics.pas index bbdca48911..a9f9db3e3d 100644 --- a/lcl/intfgraphics.pas +++ b/lcl/intfgraphics.pas @@ -599,23 +599,11 @@ const LazTiffSoftware = LazTiffExtraPrefix + 'Software'; type - {$IF FPC_FULLVERSION<20601} - {$DEFINE OldTiffCreateImageHook} - {$ENDIF} - TLazReaderTiff = class(TFPReaderTiff, ILazImageReader) private FUpdateDescription: Boolean; - {$IFDEF OldTiffCreateImageHook} - // the OnCreateImage event is "abused" to update the description after the - // format and before the image is read - FOrgEvent: TTiffCreateCompatibleImgEvent; - procedure CreateImageHook(Sender: TFPReaderTiff; var NewImage: TFPCustomImage); - procedure DoCreateImage(ImgFileDir: TTiffIDF); - {$ELSE} protected procedure DoCreateImage(ImgFileDir: TTiffIFD); override; - {$ENDIF} public function GetUpdateDescription: Boolean; procedure SetUpdateDescription(AValue: Boolean); @@ -6185,15 +6173,12 @@ begin end; {$ENDIF} -procedure TLazReaderTiff.DoCreateImage( - ImgFileDir: {$IFDEF OldTiffCreateImageHook}TTiffIDF{$ELSE}TTiffIFD{$ENDIF}); +procedure TLazReaderTiff.DoCreateImage(ImgFileDir: TTiffIFD); var Desc: TRawImageDescription; IsAlpha, IsGray: Boolean; begin - {$IFNDEF OldTiffCreateImageHook} inherited; - {$ENDIF} if not FUpdateDescription then Exit; if not (theImage is TLazIntfImage) then Exit; @@ -6266,15 +6251,7 @@ end; procedure TLazReaderTiff.InternalRead(Str: TStream; Img: TFPCustomImage); begin - {$IFDEF OldTiffCreateImageHook} - FOrgEvent := OnCreateImage; - OnCreateImage := @CreateImageHook; inherited InternalRead(Str, Img); - OnCreateImage := FOrgEvent; - FOrgEvent := nil; - {$ELSE} - inherited InternalRead(Str, Img); - {$ENDIF} end; function TLazReaderTiff.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF}; diff --git a/lcl/lazcanvas.pas b/lcl/lazcanvas.pas index 1c9b65ec56..33d5d0e382 100644 --- a/lcl/lazcanvas.pas +++ b/lcl/lazcanvas.pas @@ -888,11 +888,7 @@ begin Font.Bold := AFont.Bold; Font.Italic := AFont.Italic; Font.Underline := AFont.Underline; - {$IF (FPC_FULLVERSION<=20600)} - Font.{%H-}StrikeTrough := AFont.{%H-}StrikeTrough; //old version with typo - {$ELSE} Font.StrikeThrough := AFont.StrikeThrough; - {$ENDIF} end; { TFPWindowsSharpInterpolation } diff --git a/lcl/lclmemmanager.pas b/lcl/lclmemmanager.pas index 481391a68e..fcade5712b 100644 --- a/lcl/lclmemmanager.pas +++ b/lcl/lclmemmanager.pas @@ -84,17 +84,11 @@ type procedure EnumerateItems(const Method: TLCLEnumItemsMethod); end; -{$IF FPC_FULLVERSION>20402} - TStreamSizeType = PtrInt; -{$ELSE} - TStreamSizeType = Longint; -{$IFEND} - { TExtMemoryStream } TExtMemoryStream = class(TMemoryStream) protected - function Realloc(var NewCapacity: TStreamSizeType): Pointer; override; + function Realloc(var NewCapacity: PtrInt): Pointer; override; public property Capacity; end; @@ -274,7 +268,7 @@ end; { TExtMemoryStream } -function TExtMemoryStream.Realloc(var NewCapacity: TStreamSizeType): Pointer; +function TExtMemoryStream.Realloc(var NewCapacity: PtrInt): Pointer; begin // if we are growing, grow at least a quarter if (NewCapacity > Capacity) then diff --git a/lcl/lclproc.pas b/lcl/lclproc.pas index ea097b1631..18b3b5f308 100644 --- a/lcl/lclproc.pas +++ b/lcl/lclproc.pas @@ -1645,9 +1645,7 @@ begin vtPWideChar: s:=AnsiString(WideString(s)+Args[i].VPWideChar); vtWideChar: s:=AnsiString(WideString(s)+Args[i].VWideChar); vtWidestring: s:=AnsiString(WideString(s)+WideString(Args[i].VWideString)); -{$IF FPC_FULLVERSION>=20701} vtUnicodeString: s:=AnsiString(UnicodeString(s)+UnicodeString(Args[i].VUnicodeString)); -{$endif} vtObject: s:=s+DbgSName(Args[i].VObject); vtClass: s:=s+DbgSName(Args[i].VClass); vtPointer: s:=s+Dbgs(Args[i].VPointer); diff --git a/lcl/lresources.pp b/lcl/lresources.pp index ea2a3870f1..8a5d41c80d 100644 --- a/lcl/lresources.pp +++ b/lcl/lresources.pp @@ -800,8 +800,6 @@ end; function FindResourceLFM(ResName: string): HRSRC; {$if defined(WinCE)} -//function FindResourceLFM(ResName: string): HRSRC; -//{$if (FPC_FULLVERSION>=20605) and defined(WinCE)} var u: UnicodeString; begin