Remove obsolete checks for FPC versions earlier then 3.0.

This commit is contained in:
Juha 2023-07-07 12:20:43 +03:00
parent a1bf47ed7d
commit 41adb276bb
49 changed files with 44 additions and 588 deletions

View File

@ -382,11 +382,7 @@ type
property Bold; // only windows property Bold; // only windows
property Italic; // only windows property Italic; // only windows
property Underline; // not supported property Underline; // not supported
{$IF (FPC_FULLVERSION<=20600) or (FPC_FULLVERSION=20602)}
property StrikeTrough; //old version with typo
{$ELSE}
property StrikeThrough; property StrikeThrough;
{$ENDIF}
end; end;
{ TAggFPPath } { TAggFPPath }

View File

@ -19,11 +19,7 @@ unit CairoCanvas;
|____TCairoSvgCanvas |____TCairoSvgCanvas
*) *)
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
{$if (FPC_FULLVERSION>=20701)}
{$Packset 1} {$Packset 1}
{$endif}
{$define pangocairo} {$define pangocairo}
{-$define DebugClip} {-$define DebugClip}

View File

@ -7,7 +7,7 @@ unit CairoCanvasAll;
interface interface
{$IF ((FPC_FULLVERSION>=20701) or not defined(win64)) and not defined(WinCE)} {$IF not defined(WinCE)}
uses uses
{%H-}CairoCanvas, {%H-}CairoPrinter; {%H-}CairoCanvas, {%H-}CairoPrinter;
{$ENDIF} {$ENDIF}

View File

@ -10,11 +10,9 @@ unit ChmContentProvider;
{$Note Compiling lhelp with search support} {$Note Compiling lhelp with search support}
{$DEFINE CHM_SEARCH} {$DEFINE CHM_SEARCH}
{$IF FPC_FULLVERSION>=20400}
{$Note Compiling lhelp *with* binary index and toc support} {$Note Compiling lhelp *with* binary index and toc support}
// CHMs can have both binary and text Table of Contents and index // 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 {$DEFINE CHM_BINARY_INDEX_TOC} // internal chm index else external file`s indexes
{$endif}
{off $DEFINE CHM_DEBUG_TIME} {off $DEFINE CHM_DEBUG_TIME}

View File

@ -199,7 +199,7 @@ begin
ParamString:=''; ParamString:='';
for i:=0 to ParamCount-1 do begin for i:=0 to ParamCount-1 do begin
// read ParamFlags // read ParamFlags
Len:={$IF FPC_FULLVERSION>=30000}SizeOf(TParamFlags){$ELSE}1{$ENDIF}; Len:=SizeOf(TParamFlags);
ParamType.Flags:=[]; ParamType.Flags:=[];
Move(TypeData^.ParamList[Offset],ParamType.Flags,Len); Move(TypeData^.ParamList[Offset],ParamType.Flags,Len);
inc(Offset,Len); inc(Offset,Len);

View File

@ -13,21 +13,15 @@ unit reportconns;
{$DEFINE HASORACLECONNECTION} {$DEFINE HASORACLECONNECTION}
{$ENDIF} {$ENDIF}
{$IF FPC_FULLVERSION >= 20601} // MS SQL Server and Sybase ASE connectors were introduced in the FPC 2.7 development branch,
// 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
// 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)}
{$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 HASMSSQLCONNECTION} {$DEFINE HASSYBASECONNECTION}
{$DEFINE HASSYBASECONNECTION}
{$ENDIF}
{$ENDIF} {$ENDIF}
{$IF FPC_FULLVERSION >= 20603} {$DEFINE HASMYSQL56CONNECTION}
{$DEFINE HASMYSQL56CONNECTION} {$DEFINE HASMYSQL57CONNECTION}
{$ENDIF}
{$IF FPC_FULLVERSION >= 20701}
{$DEFINE HASMYSQL57CONNECTION}
{$ENDIF}
{$mode objfpc}{$H+} {$mode objfpc}{$H+}

View File

@ -4586,11 +4586,7 @@ begin
ADest.Font.Bold := AFont.Bold; ADest.Font.Bold := AFont.Bold;
ADest.Font.Italic := AFont.Italic; ADest.Font.Italic := AFont.Italic;
ADest.Font.Underline := AFont.Underline; 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; ADest.Font.StrikeThrough := AFont.StrikeThrough;
{$ENDIF}
{$ifdef USE_LCL_CANVAS} {$ifdef USE_LCL_CANVAS}
ALCLDest.Font.Orientation := Round(AFont.Orientation * 10); // wp: was * 16 ALCLDest.Font.Orientation := Round(AFont.Orientation * 10); // wp: was * 16

View File

@ -364,19 +364,9 @@ const
* *
******************************************************************) ******************************************************************)
procedure TT_Done_Stream( stream : TT_Stream ); procedure TT_Done_Stream( stream : TT_Stream );
{$IF FPC_FULLVERSION<20701}
var
p: Pointer;
{$ENDIF}
begin begin
if stream.z = nil then exit; 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; TFreeTypeStream(stream.z).FUsed := false;
{$ENDIF}
end; end;
(******************************************************************* (*******************************************************************

View File

@ -344,20 +344,15 @@ type
// recursive declaration // recursive declaration
TSize = record TSize = record
cx : Longint; cy : Longint; cx : Longint; cy : Longint;
public public
{$if FPC_FULLVERSION >= 30000} constructor Create(asz :TSize);
constructor Create(asz :TSize);
{$ENDIF}
end; end;
TFunc1 = function(SomeValue, Foo: Integer; Bar: Word; X: Byte): Boolean; TFunc1 = function(SomeValue, Foo: Integer; Bar: Word; X: Byte): Boolean;
TProc1 = procedure(); TProc1 = procedure();
TMeth1 = function(AVal: Integer): Boolean of object; TMeth1 = function(AVal: Integer): Boolean of object;
{$if FPC_FULLVERSION >= 30000}
PFuncSelfRef = ^TFuncSelfRef; PFuncSelfRef = ^TFuncSelfRef;
TFuncSelfRef = function(SomeValue, Foo: PFuncSelfRef): PFuncSelfRef; TFuncSelfRef = function(SomeValue, Foo: PFuncSelfRef): PFuncSelfRef;
{$ENDIF}
// Recursive pointers // Recursive pointers
TRecursePtrA1 = ^TRecursePtrA2; TRecursePtrA1 = ^TRecursePtrA2;
@ -534,10 +529,7 @@ var
MyStringList: TMyStringList; MyStringList: TMyStringList;
U8Data1, U8Data2: Utf8String; U8Data1, U8Data2: Utf8String;
{$if FPC_FULLVERSION >= 30000}
dummy1: PFuncSelfRef; dummy1: PFuncSelfRef;
{$ENDIF}
const const
(* LOCATION: global const *) (* LOCATION: global const *)
@ -607,10 +599,8 @@ var
TEST_PREPOCESS(WatchesValuePrgIdent.inc, pre__=gv_ptrlist_, "_OP_=:PPointerList;//", "_O2_=:PPointerList;//" ) TEST_PREPOCESS(WatchesValuePrgIdent.inc, pre__=gv_ptrlist_, "_OP_=:PPointerList;//", "_O2_=:PPointerList;//" )
{$if FPC_FULLVERSION >= 30000}
constructor TSize.Create(asz :TSize); constructor TSize.Create(asz :TSize);
begin end; begin end;
{$endif}
constructor TObjectCreate3Int64.Create; constructor TObjectCreate3Int64.Create;
begin end; begin end;
destructor TObjectCreate3Int64.Destroy; destructor TObjectCreate3Int64.Destroy;
@ -983,10 +973,7 @@ begin
VarCastRecl4.l4 := 13; VarCastRecl4.l4 := 13;
VarCastRecq2.q := $0010001100120013; VarCastRecq2.q := $0010001100120013;
VarCastRecq2.q2 := $0020002100220023; VarCastRecq2.q2 := $0020002100220023;
{$if FPC_FULLVERSION >= 30000}
dummy1 := nil; dummy1 := nil;
{$ENDIF}
with ModifyTestByte do begin pre := qword($9696969696969696); post := $69; val := $01; end; with ModifyTestByte do begin pre := qword($9696969696969696); post := $69; val := $01; end;
with ModifyTestWord do begin pre := qword($9696969696969696); post := $69; val := $0101; end; with ModifyTestWord do begin pre := qword($9696969696969696); post := $69; val := $0101; end;

View File

@ -153,9 +153,7 @@ procedure TfrDBDataSet.FreeBookMark(BM: Pointer);
var var
ds: TDataset; ds: TDataset;
begin begin
{$IFNDEF noautomatedbookmark}
SetLength(TBookMark(BM),0); //decreases refcount of bookmark SetLength(TBookMark(BM),0); //decreases refcount of bookmark
{$ENDIF noautomatedbookmark}
ds := DataSet; ds := DataSet;
if Assigned(ds) and Assigned(BM) then if Assigned(ds) and Assigned(BM) then
ds.FreeBookmark(BM); ds.FreeBookmark(BM);

View File

@ -24,9 +24,7 @@ unit LR_RRect;
interface interface
{$I lr_vers.inc} {$I lr_vers.inc}
{$if (FPC_FULLVERSION>=20701)}
{$Packset 1} {$Packset 1}
{$endif}
uses uses
Classes, SysUtils, LResources, GraphMath, Classes, SysUtils, LResources, GraphMath,

View File

@ -56,11 +56,6 @@
{$ENDIF} {$ENDIF}
{$DEFINE Delphi5} {$DEFINE Delphi5}
{$if FPC_FULLVERSION<20701}
// in former FCL versions TBookmark was a simple pointer
{$DEFINE noautomatedbookmark}
{$endif}
{$IFDEF Darwin} {$IFDEF Darwin}
{$DEFINE PRINTDIALOG_NATIVE_PRINTDIALOG} {$DEFINE PRINTDIALOG_NATIVE_PRINTDIALOG}
{$DEFINE PRINTDIALOG_DISABLE_PRINTER_PROPERTIES} {$DEFINE PRINTDIALOG_DISABLE_PRINTER_PROPERTIES}

View File

@ -26,19 +26,14 @@ uses
{$ELSE} {$ELSE}
{$IFnDEF HASAMIGA} {$IFnDEF HASAMIGA}
Unix, BaseUnix, Unix, BaseUnix,
{$If defined(Linux) and (FPC_FULLVERSION<30000)}
Linux,
{$EndIf}
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
Classes; Classes;
{$IF FPC_FULLVERSION>=30000}
function GetTickCount64: QWord; function GetTickCount64: QWord;
begin begin
Result := SysUtils.GetTickCount64; Result := SysUtils.GetTickCount64;
end; end;
{$ENDIF}
// ToDo: Move the code to 1 include file per platform // ToDo: Move the code to 1 include file per platform
{$IFDEF WINDOWS} {$IFDEF WINDOWS}
@ -49,15 +44,6 @@ begin
windows.GetSystemTime(SystemTime{%H-}); windows.GetSystemTime(SystemTime{%H-});
result := systemTimeToDateTime(SystemTime); result := systemTimeToDateTime(SystemTime);
end; 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} {$ELSE WINDOWS}
{$IFDEF UNIX} {$IFDEF UNIX}
Const Const
@ -115,39 +101,12 @@ begin
result := systemTimeToDateTime(SystemTime); result := systemTimeToDateTime(SystemTime);
end; 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} {$ELSE UNIX}
// Not Windows and not UNIX, so just write the most trivial code until we have something better: // Not Windows and not UNIX, so just write the most trivial code until we have something better:
function NowUTC: TDateTime; function NowUTC: TDateTime;
begin begin
Result := Now; Result := Now;
end; end;
{$IF FPC_FULLVERSION<30000}
function GetTickCount64: QWord;
begin
Result := Trunc(Now * 24 * 60 * 60 * 1000);
end;
{$ENDIF FPC_FULLVERSION}
{$ENDIF UNIX} {$ENDIF UNIX}
{$ENDIF WINDOWS} {$ENDIF WINDOWS}

View File

@ -258,11 +258,7 @@ begin
if FNeedRTLAnsiValid then if FNeedRTLAnsiValid then
exit(FNeedRTLAnsi); exit(FNeedRTLAnsi);
{$IFDEF Windows} {$IFDEF Windows}
{$IF FPC_FULLVERSION>=20701} FNeedRTLAnsi:=DefaultSystemCodePage<>CP_UTF8;
FNeedRTLAnsi:=DefaultSystemCodePage<>CP_UTF8;
{$ELSE}
FNeedRTLAnsi:=GetACP<>CP_UTF8;
{$ENDIF}
{$ELSE} {$ELSE}
FNeedRTLAnsi:=false; FNeedRTLAnsi:=false;
Lang := SysUtils.GetEnvironmentVariable('LC_ALL'); Lang := SysUtils.GetEnvironmentVariable('LC_ALL');

View File

@ -260,35 +260,9 @@ end;
{$ENDIF WINCE} {$ENDIF WINCE}
function GetEnvironmentVariableWide(const EnvVar: string): UnicodeString; function GetEnvironmentVariableWide(const EnvVar: string): UnicodeString;
{$IF FPC_FULLVERSION>=30000}
begin begin
Result:=GetEnvironmentVariable(UTF8ToUTF16(EnvVar)); Result:=GetEnvironmentVariable(UTF8ToUTF16(EnvVar));
end; 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 //*************** END WideString impementations

View File

@ -37,29 +37,21 @@ unit registersqldb;
{$DEFINE HASORACLECONNECTION} {$DEFINE HASORACLECONNECTION}
{$ENDIF} {$ENDIF}
{$IF FPC_FULLVERSION >= 20601} // MS SQL Server and Sybase ASE connectors were introduced in the FPC 2.7 development branch,
// 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
// 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)}
{$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 HASMSSQLCONNECTION} {$DEFINE HASSYBASECONNECTION}
{$DEFINE HASSYBASECONNECTION}
{$ENDIF}
{$ENDIF} {$ENDIF}
{$IF FPC_FULLVERSION >= 20602}
// These were backported to FPC 2.6.2 // These were backported to FPC 2.6.2
{$DEFINE HASFBADMIN} {$DEFINE HASFBADMIN}
{$DEFINE HASPQEVENT} {$DEFINE HASPQEVENT}
{$DEFINE HASFBEVENT} {$DEFINE HASFBEVENT}
{$DEFINE HASLIBLOADER} {$DEFINE HASLIBLOADER}
{$ENDIF}
{$IF FPC_FULLVERSION >= 20603} {$DEFINE HASMYSQL56CONNECTION}
{$DEFINE HASMYSQL56CONNECTION} {$DEFINE HASMYSQL57CONNECTION}
{$ENDIF}
{$IF FPC_FULLVERSION >= 20701}
{$DEFINE HASMYSQL57CONNECTION}
{$ENDIF}
{$IF FPC_FULLVERSION >= 30202} {$IF FPC_FULLVERSION >= 30202}
{$DEFINE HASMYSQL80CONNECTION} {$DEFINE HASMYSQL80CONNECTION}
{$ENDIF} {$ENDIF}

View File

@ -10,24 +10,18 @@ unit schemaconns;
{$DEFINE HASSQLITE3CONNECTION} {$DEFINE HASSQLITE3CONNECTION}
{$IF (FPC_FULLVERSION>=30002) or not defined(win64)} {$IF (FPC_FULLVERSION>=30002) or not defined(win64)}
{$DEFINE HASORACLECONNECTION} {$DEFINE HASORACLECONNECTION}
{$ENDIF} {$ENDIF}
{$IF FPC_FULLVERSION >= 20601} // MS SQL Server and Sybase ASE connectors were introduced in the FPC 2.7 development branch,
// 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
// 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)}
{$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 HASMSSQLCONNECTION} {$DEFINE HASSYBASECONNECTION}
{$DEFINE HASSYBASECONNECTION}
{$ENDIF}
{$ENDIF} {$ENDIF}
{$IF FPC_FULLVERSION >= 20603} {$DEFINE HASMYSQL56CONNECTION}
{$DEFINE HASMYSQL56CONNECTION} {$DEFINE HASMYSQL57CONNECTION}
{$ENDIF}
{$IF FPC_FULLVERSION >= 20701}
{$DEFINE HASMYSQL57CONNECTION}
{$ENDIF}
{$mode objfpc}{$H+} {$mode objfpc}{$H+}

View File

@ -13,11 +13,6 @@ uses
SynEditMiscClasses, SynTextDrawer, SynEditPointClasses, SynEditMarkupSelection, SynEditMiscClasses, SynTextDrawer, SynEditPointClasses, SynEditMarkupSelection,
SynEditMarkup, SynEditTypes, SynEditKeyCmds, LazSynEditText, SynEditTextBase; 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 type
{ LazSynWinIme } { LazSynWinIme }

View File

@ -479,17 +479,13 @@ const
implementation implementation
function IsIdentifierChar(p: PChar): boolean; inline; function IsIdentifierChar(p: PChar): boolean; inline;
{$IF FPC_FULLVERSION >= 20701}
var var
u: UnicodeString; u: UnicodeString;
i: Integer; i: Integer;
L: SizeUInt; L: SizeUInt;
{$ENDIF}
begin begin
Result := p^ in ['a'..'z','A'..'Z','0'..'9','_']; Result := p^ in ['a'..'z','A'..'Z','0'..'9','_'];
if Result then exit; if Result then exit;
{$IF FPC_FULLVERSION >= 20701}
if p^ <= #127 then exit; if p^ <= #127 then exit;
i := UTF8CodepointSize(p); i := UTF8CodepointSize(p);
SetLength(u, i); SetLength(u, i);
@ -500,7 +496,6 @@ begin
if L > 1 then if L > 1 then
Result := TCharacter.IsLetterOrDigit(u, 1); Result := TCharacter.IsLetterOrDigit(u, 1);
end; end;
{$ENDIF}
end; end;
{ TSynBaseCompletionFormScrollBar } { TSynBaseCompletionFormScrollBar }

View File

@ -427,11 +427,7 @@ begin
dec(PWidths); dec(PWidths);
{$IFDEF SynForceDoubeWidthHack} {$IFDEF SynForceDoubeWidthHack}
{$IF FPC_FULLVERSION>=20701}
if (DefaultSystemCodePage = 932) {Japanese} if (DefaultSystemCodePage = 932) {Japanese}
{$ELSE}
if (GetACP = 932) {Japanese}
{$ENDIF}
then begin then begin
for i := 0 to LineLen - 1 do begin for i := 0 to LineLen - 1 do begin
inc(Line); inc(Line);

View File

@ -1,9 +1,5 @@
unit reglazvlc; unit reglazvlc;
{$IF FPC_FULLVERSION<20701}
{$ERROR needs at least FPC 2.7.1}
{$ENDIF}
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface

View File

@ -1248,9 +1248,6 @@ var
StartTime: TDateTime; StartTime: TDateTime;
EndTime: TDateTime; EndTime: TDateTime;
begin begin
{$IF FPC_FULLVERSION<30000}
CurrentThread:=Self;
{$ENDIF}
try try
Files:=nil; Files:=nil;
try try
@ -1301,9 +1298,6 @@ begin
end; end;
finally finally
Scanned; Scanned;
{$IF FPC_FULLVERSION<30000}
CurrentThread:=nil;
{$ENDIF}
end; end;
end; end;
@ -1547,11 +1541,7 @@ begin
FScanThread:=TWikiHelpThread.Create(true); FScanThread:=TWikiHelpThread.Create(true);
FScanThread.FreeOnTerminate:=true; FScanThread.FreeOnTerminate:=true;
FScanThread.Help:=Self; FScanThread.Help:=Self;
{$IF FPC_FULLVERSION<=20403}
FScanThread.Resume;
{$ELSE}
FScanThread.Start; FScanThread.Start;
{$ENDIF}
finally finally
LeaveCritSect; LeaveCritSect;
end; end;

View File

@ -24,9 +24,6 @@ Uses
{$IFDEF UNIX}{$IFDEF UseCThreads} {$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads, cthreads,
{$ENDIF}{$ENDIF} {$ENDIF}{$ENDIF}
{$IF FPC_FULLVERSION<20602}
{$ERROR this example requires at least fpc 2.6.2}
{$ENDIF}
daemonapp, lazdaemonapp, daemonapp, lazdaemonapp,
sysutils sysutils
{ add your units here }, svcmap, svccleandirs, dircleaner; { add your units here }, svcmap, svccleandirs, dircleaner;

View File

@ -8,10 +8,6 @@ See readme.txt for details on required drivers.
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
{$IF FPC_FULLVERSION<20601}
{$ERROR this example requires at least fpc 2.6.1}
{$ENDIF}
uses uses
{$IFDEF UNIX}{$IFDEF UseCThreads} {$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads, cthreads,

View File

@ -48,13 +48,7 @@
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
{$IF FPC_FULLVERSION<20700} {$IF defined(Windows) and defined(HEAPTRC_WINDOW)}
// 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)}
{$DEFINE EnableRedirectStdErr} {$DEFINE EnableRedirectStdErr}
{$ENDIF} {$ENDIF}

View File

@ -34,11 +34,7 @@ uses
{$IFDEF UNIX} {$IFDEF UNIX}
baseunix, baseunix,
{$endif} {$endif}
sysutils, Classes, LazFileUtils sysutils, Classes, LazFileUtils;
{$IF FPC_FULLVERSION<20701}
,LazSysUtils
{$ENDIF}
;
const const
HEADER_VERSION = 2; HEADER_VERSION = 2;
@ -184,7 +180,7 @@ resourcestring
implementation implementation
type type
TIPCSearchRec = {$IF FPC_FULLVERSION>=20701}TRawByteSearchRec{$ELSE}TSearchRec{$ENDIF}; TIPCSearchRec = TRawByteSearchRec;
const const
{$IFDEF UNIX} {$IFDEF UNIX}

View File

@ -279,9 +279,6 @@ begin
DebugLn(['TLazBuildApplication.OnCodeBufferEncodeSaving Filename=',Code.Filename,' Mem=',Code.MemEncoding,' to Disk=',Code.DiskEncoding]); DebugLn(['TLazBuildApplication.OnCodeBufferEncodeSaving Filename=',Code.Filename,' Mem=',Code.MemEncoding,' to Disk=',Code.DiskEncoding]);
{$ENDIF} {$ENDIF}
Source:=ConvertEncoding(Source,Code.MemEncoding,Code.DiskEncoding); Source:=ConvertEncoding(Source,Code.MemEncoding,Code.DiskEncoding);
{$IF FPC_FULLVERSION >= 20701}
//SetCodePage(Source,CP_ACP);
{$ENDIF}
end; end;
end; end;

View File

@ -29,20 +29,17 @@ interface
{$IFDEF Windows} {$IFDEF Windows}
{$IFDEF HEAPTRC_WINDOW} {$IFDEF HEAPTRC_WINDOW}
{$IF FPC_FULLVERSION>=20701}
uses uses
SysUtils, Windows, Messages; SysUtils, Windows, Messages;
procedure ShowWindow(AStr : String); procedure ShowWindow(AStr : String);
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
{$ENDIF}
implementation implementation
{$IFDEF Windows} {$IFDEF Windows}
{$IFDEF HEAPTRC_WINDOW} {$IFDEF HEAPTRC_WINDOW}
{$IF FPC_FULLVERSION>=20701}
Var Var
WndHandle, WndHandle,
ButtonHandle, ButtonHandle,
@ -191,7 +188,6 @@ Begin
end; end;
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
{$ENDIF}
end. end.

View File

@ -36,10 +36,6 @@ uses
LCLIntf, LCLType, LMessages, LResources, Controls, StdCtrls, Graphics, Grids, LCLIntf, LCLType, LMessages, LResources, Controls, StdCtrls, Graphics, Grids,
Dialogs, Themes, Variants, Clipbrd, ImgList, Laz2_XMLCfg; Dialogs, Themes, Variants, Clipbrd, ImgList, Laz2_XMLCfg;
{$if FPC_FULLVERSION<20701}
{$DEFINE noautomatedbookmark}
{$endif}
const const
DEFINDICATORCOLWIDTH = 12; DEFINDICATORCOLWIDTH = 12;
@ -4614,15 +4610,11 @@ begin
if Find(Bookmark, Index) then begin if Find(Bookmark, Index) then begin
FDataset.FreeBookmark(Bookmark); FDataset.FreeBookmark(Bookmark);
{$ifndef noautomatedbookmark}
SetLength(TBookmark(Bookmark),0); // decrease reference count SetLength(TBookmark(Bookmark),0); // decrease reference count
{$endif noautomatedbookmark}
if not AValue then begin if not AValue then begin
FDataset.FreeBookmark(Pointer(Items[Index])); FDataset.FreeBookmark(Pointer(Items[Index]));
{$ifndef noautomatedbookmark}
Bookmark := FList[Index]; Bookmark := FList[Index];
SetLength(TBookmark(Bookmark),0); // decrease reference count SetLength(TBookmark(Bookmark),0); // decrease reference count
{$endif noautomatedbookmark}
FList.Delete(Index); FList.Delete(Index);
FGrid.Invalidate; FGrid.Invalidate;
end; end;
@ -4635,9 +4627,7 @@ begin
end else end else
begin begin
FDataset.FreeBookmark(Bookmark); FDataset.FreeBookmark(Bookmark);
{$ifndef noautomatedbookmark}
SetLength(TBookmark(Bookmark),0); // decrease reference count SetLength(TBookmark(Bookmark),0); // decrease reference count
{$endif}
end; end;
end; end;
end; end;
@ -4704,9 +4694,7 @@ end;
procedure TBookmarkList.Clear; procedure TBookmarkList.Clear;
var var
i: Integer; i: Integer;
{$ifndef noautomatedbookmark}
Bookmark: Pointer; Bookmark: Pointer;
{$endif}
begin begin
for i:=0 to FList.Count-1 do for i:=0 to FList.Count-1 do
begin begin
@ -4714,10 +4702,8 @@ begin
DebugLn('%s.Clear', [ClassName]); DebugLn('%s.Clear', [ClassName]);
{$endif} {$endif}
FDataset.FreeBookmark(Items[i]); FDataset.FreeBookmark(Items[i]);
{$ifndef noautomatedbookmark}
Bookmark := FList[i]; Bookmark := FList[i];
SetLength(TBookmark(Bookmark),0); // decrease reference count SetLength(TBookmark(Bookmark),0); // decrease reference count
{$endif noautomatedbookmark}
end; end;
FList.Clear; FList.Clear;
FGrid.Invalidate; FGrid.Invalidate;
@ -4726,21 +4712,15 @@ end;
procedure TBookmarkList.Delete; procedure TBookmarkList.Delete;
var var
i: Integer; i: Integer;
{$ifndef noautomatedbookmark}
Bookmark: Pointer; Bookmark: Pointer;
{$endif}
begin begin
{$ifdef dbgDBGrid} {$ifdef dbgDBGrid}
DebugLn('%s.Delete', [ClassName]); DebugLn('%s.Delete', [ClassName]);
{$endif} {$endif}
for i := FList.Count-1 downto 0 do begin for i := FList.Count-1 downto 0 do begin
FDataset.GotoBookmark(Items[i]); FDataset.GotoBookmark(Items[i]);
{$ifndef noautomatedbookmark}
Bookmark := FList[i]; Bookmark := FList[i];
SetLength(TBookmark(Bookmark),0); // decrease reference count SetLength(TBookmark(Bookmark),0); // decrease reference count
{$else}
FDataset.FreeBookmark(Items[i]);
{$endif noautomatedbookmark}
FDataset.Delete; FDataset.Delete;
FList.Delete(i); FList.Delete(i);
end; end;
@ -4819,9 +4799,7 @@ end;
function TBookmarkList.Refresh: boolean; function TBookmarkList.Refresh: boolean;
var var
i: LongInt; i: LongInt;
{$ifndef noautomatedbookmark}
Bookmark: Pointer; Bookmark: Pointer;
{$endif}
begin begin
{$ifdef dbgDBGrid} {$ifdef dbgDBGrid}
DebugLn('%s.Refresh', [ClassName]); DebugLn('%s.Refresh', [ClassName]);
@ -4831,10 +4809,8 @@ begin
if not FDataset.BookmarkValid(TBookMark(Items[i])) then begin if not FDataset.BookmarkValid(TBookMark(Items[i])) then begin
Result := True; Result := True;
FDataset.FreeBookmark(Items[i]); FDataset.FreeBookmark(Items[i]);
{$ifndef noautomatedbookmark}
Bookmark := FList[i]; Bookmark := FList[i];
SetLength(TBookmark(Bookmark),0); // decrease reference count SetLength(TBookmark(Bookmark),0); // decrease reference count
{$endif noautomatedbookmark}
Flist.Delete(i); Flist.Delete(i);
end; end;
if Result then if Result then

View File

@ -25,18 +25,9 @@ interface
{$ASSERTIONS ON} {$ASSERTIONS ON}
{$endif} {$endif}
{$IF FPC_FULLVERSION>=20601}
{$DEFINE HasFPCanvas1} {$DEFINE HasFPCanvas1}
{$ENDIF}
{$IF FPC_FULLVERSION>=20603}
{$DEFINE HasFPEndCap} {$DEFINE HasFPEndCap}
{$ENDIF}
{$IF FPC_FULLVERSION>=20603}
{$DEFINE HasFPJoinStyle} {$DEFINE HasFPJoinStyle}
{$ENDIF}
{$IF FPC_FULLVERSION>=30203} {$IF FPC_FULLVERSION>=30203}
{$DEFINE UseSystemUITypes} {$DEFINE UseSystemUITypes}
{$ENDIF} {$ENDIF}

View File

@ -334,8 +334,7 @@ type
procedure ReadData(AStream: TStream); virtual; procedure ReadData(AStream: TStream); virtual;
procedure WriteAdvData(AStream: TStream); virtual; procedure WriteAdvData(AStream: TStream); virtual;
procedure ReadAdvData(AStream: TStream); virtual; procedure ReadAdvData(AStream: TStream); virtual;
function Equals(Obj: TObject): boolean; function Equals(Obj: TObject): boolean; override;
{$IF FPC_FULLVERSION>=20402}override;{$ENDIF}
procedure BeginUpdate; procedure BeginUpdate;
procedure EndUpdate; procedure EndUpdate;

View File

@ -1583,9 +1583,7 @@ destructor TCanvas.Destroy;
begin begin
//DebugLn('[TCanvas.Destroy] ',ClassName,' Self=',DbgS(Self)); //DebugLn('[TCanvas.Destroy] ',ClassName,' Self=',DbgS(Self));
Handle := 0; Handle := 0;
{$IF FPC_FULLVERSION>=20602}
FreeThenNil(FClipRegion); {issue #24980 looks like TFPCustomCanvas bug} FreeThenNil(FClipRegion); {issue #24980 looks like TFPCustomCanvas bug}
{$ENDIF}
FreeThenNil(FRegion); FreeThenNil(FRegion);
FreeThenNil(FSavedHandleStates); FreeThenNil(FSavedHandleStates);
if FLock <> 0 then if FLock <> 0 then

View File

@ -2392,11 +2392,7 @@ begin
CurStream.Free; CurStream.Free;
end; end;
end else end else
{$IF FPC_FULLVERSION>20402}
Result:=inherited Equals(Obj); Result:=inherited Equals(Obj);
{$ELSE}
Result:=false;
{$ENDIF}
end; end;
function TCustomImageList.FindResolution(AImageWidth: Integer; out function TCustomImageList.FindResolution(AImageWidth: Integer; out

View File

@ -3,10 +3,8 @@
{$DEFINE UseCLDefault} {$DEFINE UseCLDefault}
{$WARN SYMBOL_PLATFORM OFF} {$WARN SYMBOL_PLATFORM OFF}
{$IF FPC_FULLVERSION>=20701} // NOREMOVEEMPTYPROCS bites double inheritance in wslclclasses.pp
// NOREMOVEEMPTYPROCS bites double inheritance in wslclclasses.pp {$OPTIMIZATION NOREMOVEEMPTYPROCS}
{$OPTIMIZATION NOREMOVEEMPTYPROCS}
{$ENDIF}
{$IFNDEF FPC_FULLVERSION} {$IFNDEF FPC_FULLVERSION}
{$DEFINE FPDOC} {$DEFINE FPDOC}

View File

@ -25,11 +25,7 @@ var
D, T: TDateTime; D, T: TDateTime;
S: String; S: String;
YY, MM, DD, HH, NN, SS: Integer; YY, MM, DD, HH, NN, SS: Integer;
{$IF FPC_FULLVERSION>=20601}
IFD: TTiffIFD; IFD: TTiffIFD;
{$ELSE}
IFD: TTiffIDF;
{$ENDIF}
begin begin
IFD:=TFPReaderTiff(AReader).FirstImg; IFD:=TFPReaderTiff(AReader).FirstImg;
FArtist := IFD.Artist; FArtist := IFD.Artist;

View File

@ -18,10 +18,6 @@ interface
// defines // defines
{$I carbondefines.inc} {$I carbondefines.inc}
{$if (FPC_FULLVERSION>=20701) OR (FPC_FULLVERSION>=20603)}
{$define HAS_INHERITED_INSERTITEM}
{$endif}
uses uses
// rtl+ftl // rtl+ftl
Classes, SysUtils, Classes, SysUtils,
@ -40,10 +36,6 @@ type
FOwner: TCarbonComboBox; // Carbon combo box control owning strings FOwner: TCarbonComboBox; // Carbon combo box control owning strings
protected protected
procedure Put(Index: Integer; const S: string); override; 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; procedure InsertItem(Index: Integer; const S: string; O: TObject); override;
public public
constructor Create(AOwner: TCarbonComboBox); constructor Create(AOwner: TCarbonComboBox);
@ -63,10 +55,6 @@ type
FWinControl: TWinControl; FWinControl: TWinControl;
protected protected
procedure Put(Index: Integer; const S: string); override; 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; procedure InsertItem(Index: Integer; const S: string; O: TObject); override;
public public
constructor Create(AOwner: TCarbonListBox; AWinControl: TWinControl); constructor Create(AOwner: TCarbonListBox; AWinControl: TWinControl);
@ -125,22 +113,6 @@ begin
FOwner.Insert(Index, S); FOwner.Insert(Index, S);
end; 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 Method: TCarbonComboBoxStrings.InsertItem
Params: Index - Line index Params: Index - Line index
@ -240,22 +212,6 @@ begin
FOwner.UpdateItem(Index); FOwner.UpdateItem(Index);
end; 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 Method: TCarbonListBoxStrings.InsertItem
Params: Index - Line index Params: Index - Line index

View File

@ -4071,11 +4071,7 @@ begin
TM.tmBreakChar := '?'; TM.tmBreakChar := '?';
TM.tmItalic := Ord(lFont.Italic); TM.tmItalic := Ord(lFont.Italic);
TM.tmUnderlined := Ord(lFont.Underline); 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); TM.tmStruckOut := Ord(lFont.StrikeThrough);
{$ENDIF}
{ Defaults to a TrueType font. { Defaults to a TrueType font.
Note that the meaning of the FIXED_PITCH constant is the opposite of Note that the meaning of the FIXED_PITCH constant is the opposite of

View File

@ -96,7 +96,5 @@
// See http://bugs.freepascal.org/view.php?id=18966 // See http://bugs.freepascal.org/view.php?id=18966
{$define Gtk2CallMouseDownBeforeContext} {$define Gtk2CallMouseDownBeforeContext}
{$IF FPC_FULLVERSION>=20701} {$OPTIMIZATION NOREMOVEEMPTYPROCS}
{$OPTIMIZATION NOREMOVEEMPTYPROCS}
{$ENDIF}

View File

@ -15,9 +15,6 @@ uses
xlib, x, xlib, x,
{$endif} {$endif}
glib2, gdk2, gtk2, gtk2ext, glib2, gdk2, gtk2, gtk2ext,
{$IF FPC_FULLVERSION<20600}
gdk2pixbuf,
{$ENDIF}
{$ifdef HasGdk2X} {$ifdef HasGdk2X}
gdk2x, gdk2x,
{$endif} {$endif}
@ -45,12 +42,6 @@ const
GTK_RESPONSE_LCL_IGNORE = -13; GTK_RESPONSE_LCL_IGNORE = -13;
GTK_RESPONSE_LCL_NOTOALL = -14; 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 {$IFNDEF MSWINDOWS} // this is required for compilation under windows
{$if defined(HasX)} // This is required for compilation under Mac OS X {$if defined(HasX)} // This is required for compilation under Mac OS X
var var
@ -83,35 +74,6 @@ type
PANGO_GRAVITY_AUTO 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 -------------------------- // ------------------end of symbold to remove --------------------------
function pango_context_get_gravity(Context: PPangoContext): TPangoGravity; cdecl; external pangolib; 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; 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_attr_gravity_new(gravity: TPangoGravity): PPangoAttribute; cdecl; external pangolib;
function pango_version_check(required_major, required_minor, required_micro: integer): PChar; 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; 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 - - - - - - - - - // - - - - - - - - - gtk extras - - - - - - - - -
// ----------------- this gtk symbols can be removed after fpc 2.2.4 // ----------------- 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 // gtk 2.6
type type
PGtkCellView = ^TGtkCellView; 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_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; 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; 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; 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; procedure gtk_icon_view_set_cursor(icon_view: PGtkIconView; path: PGtkTreePath; cell: PGtkCellRenderer; start_editing: gboolean); cdecl; external gtklib;

View File

@ -21,12 +21,6 @@ interface
{$I qtdefines.inc} {$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 uses
// Bindings // Bindings
qt4, qt4,
@ -50,9 +44,6 @@ type
procedure SetSorted(AValue: Boolean); procedure SetSorted(AValue: Boolean);
protected protected
procedure Put(Index: Integer; const S: string); override; 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; procedure InsertItem(Index: Integer; const S: string; O: TObject); override;
public public
constructor Create(AWinControl: TWinControl; AOwner: TQtComboBox); constructor Create(AWinControl: TWinControl; AOwner: TQtComboBox);
@ -80,9 +71,6 @@ type
FOwner: TQtListWidget; FOwner: TQtListWidget;
protected protected
procedure Put(Index: Integer; const S: string); override; 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; procedure InsertItem(Index: Integer; const S: string; O: TObject); override;
public public
constructor Create(AWinControl: TWinControl; AOwner: TQtListWidget); constructor Create(AWinControl: TWinControl; AOwner: TQtListWidget);
@ -509,27 +497,6 @@ begin
FOwner.EndUpdate; FOwner.EndUpdate;
end; 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); procedure TQtComboStrings.InsertItem(Index: Integer; const S: string; O: TObject);
var var
FSavedIndex: Integer; FSavedIndex: Integer;
@ -724,26 +691,7 @@ begin
FOwner.EndUpdate; FOwner.EndUpdate;
end; end;
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); procedure TQtListStrings.InsertItem(Index: Integer; const S: string; O: TObject);
begin begin
inherited InsertItem(Index, S, O); inherited InsertItem(Index, S, O);

View File

@ -21,12 +21,6 @@ interface
{$I qtdefines.inc} {$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 uses
// Bindings // Bindings
qt5, qt5,
@ -50,9 +44,6 @@ type
procedure SetSorted(AValue: Boolean); procedure SetSorted(AValue: Boolean);
protected protected
procedure Put(Index: Integer; const S: string); override; 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; procedure InsertItem(Index: Integer; const S: string; O: TObject); override;
public public
constructor Create(AWinControl: TWinControl; AOwner: TQtComboBox); constructor Create(AWinControl: TWinControl; AOwner: TQtComboBox);
@ -80,9 +71,6 @@ type
FOwner: TQtListWidget; FOwner: TQtListWidget;
protected protected
procedure Put(Index: Integer; const S: string); override; 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; procedure InsertItem(Index: Integer; const S: string; O: TObject); override;
public public
constructor Create(AWinControl: TWinControl; AOwner: TQtListWidget); constructor Create(AWinControl: TWinControl; AOwner: TQtListWidget);
@ -512,27 +500,6 @@ begin
FOwner.EndUpdate; FOwner.EndUpdate;
end; 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); procedure TQtComboStrings.InsertItem(Index: Integer; const S: string; O: TObject);
var var
FSavedIndex: Integer; FSavedIndex: Integer;
@ -728,26 +695,7 @@ begin
FOwner.EndUpdate; FOwner.EndUpdate;
end; end;
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); procedure TQtListStrings.InsertItem(Index: Integer; const S: string; O: TObject);
begin begin
inherited InsertItem(Index, S, O); inherited InsertItem(Index, S, O);

View File

@ -21,12 +21,6 @@ interface
{$I qtdefines.inc} {$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 uses
// Bindings // Bindings
qt6, qt6,
@ -50,9 +44,6 @@ type
procedure SetSorted(AValue: Boolean); procedure SetSorted(AValue: Boolean);
protected protected
procedure Put(Index: Integer; const S: string); override; 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; procedure InsertItem(Index: Integer; const S: string; O: TObject); override;
public public
constructor Create(AWinControl: TWinControl; AOwner: TQtComboBox); constructor Create(AWinControl: TWinControl; AOwner: TQtComboBox);
@ -80,9 +71,6 @@ type
FOwner: TQtListWidget; FOwner: TQtListWidget;
protected protected
procedure Put(Index: Integer; const S: string); override; 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; procedure InsertItem(Index: Integer; const S: string; O: TObject); override;
public public
constructor Create(AWinControl: TWinControl; AOwner: TQtListWidget); constructor Create(AWinControl: TWinControl; AOwner: TQtListWidget);
@ -512,27 +500,6 @@ begin
FOwner.EndUpdate; FOwner.EndUpdate;
end; 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); procedure TQtComboStrings.InsertItem(Index: Integer; const S: string; O: TObject);
var var
FSavedIndex: Integer; FSavedIndex: Integer;
@ -728,26 +695,7 @@ begin
FOwner.EndUpdate; FOwner.EndUpdate;
end; end;
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); procedure TQtListStrings.InsertItem(Index: Integer; const S: string; O: TObject);
begin begin
inherited InsertItem(Index, S, O); inherited InsertItem(Index, S, O);

View File

@ -1293,11 +1293,7 @@ procedure TWindowProcHelper.DoMsgChar(var WinResult: LResult);
begin begin
OrgCharCode := Word(WParam); OrgCharCode := Word(WParam);
// Process surrogate pairs later // Process surrogate pairs later
{$IF FPC_FULLVERSION>=30000}
if TCharacter.IsSurrogate(WideChar(OrgCharCode)) then if TCharacter.IsSurrogate(WideChar(OrgCharCode)) then
{$ELSE}
if False then
{$ENDIF}
WinProcess := True WinProcess := True
// first send a IntfUTF8KeyPress to the LCL // first send a IntfUTF8KeyPress to the LCL
// if the key was not handled send a CN_CHAR for AnsiChar<=#127 // if the key was not handled send a CN_CHAR for AnsiChar<=#127

View File

@ -31,9 +31,7 @@ interface
uses uses
Windows, // keep as first Windows, // keep as first
Classes, SysUtils, RtlConsts, ActiveX, MultiMon, CommCtrl, UxTheme, ctypes, DwmApi, Classes, SysUtils, RtlConsts, ActiveX, MultiMon, CommCtrl, UxTheme, ctypes, DwmApi,
{$IF FPC_FULLVERSION>=30000}
character, character,
{$ENDIF}
// LCL // LCL
LCLPlatformDef, InterfaceBase, LCLIntf, LclProc, LCLType, LMessages, LCLPlatformDef, InterfaceBase, LCLIntf, LclProc, LCLType, LMessages,
Controls, Buttons, Forms, Dialogs, StdCtrls, Controls, Buttons, Forms, Dialogs, StdCtrls,

View File

@ -599,23 +599,11 @@ const
LazTiffSoftware = LazTiffExtraPrefix + 'Software'; LazTiffSoftware = LazTiffExtraPrefix + 'Software';
type type
{$IF FPC_FULLVERSION<20601}
{$DEFINE OldTiffCreateImageHook}
{$ENDIF}
TLazReaderTiff = class(TFPReaderTiff, ILazImageReader) TLazReaderTiff = class(TFPReaderTiff, ILazImageReader)
private private
FUpdateDescription: Boolean; 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 protected
procedure DoCreateImage(ImgFileDir: TTiffIFD); override; procedure DoCreateImage(ImgFileDir: TTiffIFD); override;
{$ENDIF}
public public
function GetUpdateDescription: Boolean; function GetUpdateDescription: Boolean;
procedure SetUpdateDescription(AValue: Boolean); procedure SetUpdateDescription(AValue: Boolean);
@ -6185,15 +6173,12 @@ begin
end; end;
{$ENDIF} {$ENDIF}
procedure TLazReaderTiff.DoCreateImage( procedure TLazReaderTiff.DoCreateImage(ImgFileDir: TTiffIFD);
ImgFileDir: {$IFDEF OldTiffCreateImageHook}TTiffIDF{$ELSE}TTiffIFD{$ENDIF});
var var
Desc: TRawImageDescription; Desc: TRawImageDescription;
IsAlpha, IsGray: Boolean; IsAlpha, IsGray: Boolean;
begin begin
{$IFNDEF OldTiffCreateImageHook}
inherited; inherited;
{$ENDIF}
if not FUpdateDescription then Exit; if not FUpdateDescription then Exit;
if not (theImage is TLazIntfImage) then Exit; if not (theImage is TLazIntfImage) then Exit;
@ -6266,15 +6251,7 @@ end;
procedure TLazReaderTiff.InternalRead(Str: TStream; Img: TFPCustomImage); procedure TLazReaderTiff.InternalRead(Str: TStream; Img: TFPCustomImage);
begin begin
{$IFDEF OldTiffCreateImageHook}
FOrgEvent := OnCreateImage;
OnCreateImage := @CreateImageHook;
inherited InternalRead(Str, Img); inherited InternalRead(Str, Img);
OnCreateImage := FOrgEvent;
FOrgEvent := nil;
{$ELSE}
inherited InternalRead(Str, Img);
{$ENDIF}
end; end;
function TLazReaderTiff.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF}; function TLazReaderTiff.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};

View File

@ -888,11 +888,7 @@ begin
Font.Bold := AFont.Bold; Font.Bold := AFont.Bold;
Font.Italic := AFont.Italic; Font.Italic := AFont.Italic;
Font.Underline := AFont.Underline; Font.Underline := AFont.Underline;
{$IF (FPC_FULLVERSION<=20600)}
Font.{%H-}StrikeTrough := AFont.{%H-}StrikeTrough; //old version with typo
{$ELSE}
Font.StrikeThrough := AFont.StrikeThrough; Font.StrikeThrough := AFont.StrikeThrough;
{$ENDIF}
end; end;
{ TFPWindowsSharpInterpolation } { TFPWindowsSharpInterpolation }

View File

@ -84,17 +84,11 @@ type
procedure EnumerateItems(const Method: TLCLEnumItemsMethod); procedure EnumerateItems(const Method: TLCLEnumItemsMethod);
end; end;
{$IF FPC_FULLVERSION>20402}
TStreamSizeType = PtrInt;
{$ELSE}
TStreamSizeType = Longint;
{$IFEND}
{ TExtMemoryStream } { TExtMemoryStream }
TExtMemoryStream = class(TMemoryStream) TExtMemoryStream = class(TMemoryStream)
protected protected
function Realloc(var NewCapacity: TStreamSizeType): Pointer; override; function Realloc(var NewCapacity: PtrInt): Pointer; override;
public public
property Capacity; property Capacity;
end; end;
@ -274,7 +268,7 @@ end;
{ TExtMemoryStream } { TExtMemoryStream }
function TExtMemoryStream.Realloc(var NewCapacity: TStreamSizeType): Pointer; function TExtMemoryStream.Realloc(var NewCapacity: PtrInt): Pointer;
begin begin
// if we are growing, grow at least a quarter // if we are growing, grow at least a quarter
if (NewCapacity > Capacity) then if (NewCapacity > Capacity) then

View File

@ -1645,9 +1645,7 @@ begin
vtPWideChar: s:=AnsiString(WideString(s)+Args[i].VPWideChar); vtPWideChar: s:=AnsiString(WideString(s)+Args[i].VPWideChar);
vtWideChar: s:=AnsiString(WideString(s)+Args[i].VWideChar); vtWideChar: s:=AnsiString(WideString(s)+Args[i].VWideChar);
vtWidestring: s:=AnsiString(WideString(s)+WideString(Args[i].VWideString)); vtWidestring: s:=AnsiString(WideString(s)+WideString(Args[i].VWideString));
{$IF FPC_FULLVERSION>=20701}
vtUnicodeString: s:=AnsiString(UnicodeString(s)+UnicodeString(Args[i].VUnicodeString)); vtUnicodeString: s:=AnsiString(UnicodeString(s)+UnicodeString(Args[i].VUnicodeString));
{$endif}
vtObject: s:=s+DbgSName(Args[i].VObject); vtObject: s:=s+DbgSName(Args[i].VObject);
vtClass: s:=s+DbgSName(Args[i].VClass); vtClass: s:=s+DbgSName(Args[i].VClass);
vtPointer: s:=s+Dbgs(Args[i].VPointer); vtPointer: s:=s+Dbgs(Args[i].VPointer);

View File

@ -800,8 +800,6 @@ end;
function FindResourceLFM(ResName: string): HRSRC; function FindResourceLFM(ResName: string): HRSRC;
{$if defined(WinCE)} {$if defined(WinCE)}
//function FindResourceLFM(ResName: string): HRSRC;
//{$if (FPC_FULLVERSION>=20605) and defined(WinCE)}
var var
u: UnicodeString; u: UnicodeString;
begin begin