mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 11:58:12 +02:00
Remove obsolete checks for FPC versions earlier then 3.0.
This commit is contained in:
parent
a1bf47ed7d
commit
41adb276bb
components
aggpas/src
cairocanvas
chmhelp/lhelp
codetools
fpreport/design
fpvectorial
freetype
lazdebuggers/lazdebugtestbase/testapps
lazreport/source
lazutils
sqldb
sqldbrest/editor
synedit
vlc
wiki/test
examples
ide
lcl
dbgrids.pasgraphics.ppimglist.ppintfgraphics.paslazcanvas.paslclmemmanager.paslclproc.paslresources.pp
include
interfaces
carbon
customdrawn
gtk2
qt
qt5
qt6
win32
@ -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 }
|
||||
|
@ -19,11 +19,7 @@ unit CairoCanvas;
|
||||
|____TCairoSvgCanvas
|
||||
*)
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{$if (FPC_FULLVERSION>=20701)}
|
||||
{$Packset 1}
|
||||
{$endif}
|
||||
|
||||
{$define pangocairo}
|
||||
|
||||
{-$define DebugClip}
|
||||
|
@ -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}
|
||||
|
@ -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}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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+}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
(*******************************************************************
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -24,9 +24,7 @@ unit LR_RRect;
|
||||
interface
|
||||
|
||||
{$I lr_vers.inc}
|
||||
{$if (FPC_FULLVERSION>=20701)}
|
||||
{$Packset 1}
|
||||
{$endif}
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, GraphMath,
|
||||
|
@ -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}
|
||||
|
@ -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}
|
||||
|
||||
|
@ -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');
|
||||
|
@ -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
|
||||
|
@ -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}
|
||||
|
@ -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+}
|
||||
|
||||
|
@ -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 }
|
||||
|
@ -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 }
|
||||
|
@ -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);
|
||||
|
@ -1,9 +1,5 @@
|
||||
unit reglazvlc;
|
||||
|
||||
{$IF FPC_FULLVERSION<20701}
|
||||
{$ERROR needs at least FPC 2.7.1}
|
||||
{$ENDIF}
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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}
|
||||
|
||||
|
@ -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}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
@ -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}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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}
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -96,7 +96,5 @@
|
||||
// See http://bugs.freepascal.org/view.php?id=18966
|
||||
{$define Gtk2CallMouseDownBeforeContext}
|
||||
|
||||
{$IF FPC_FULLVERSION>=20701}
|
||||
{$OPTIMIZATION NOREMOVEEMPTYPROCS}
|
||||
{$ENDIF}
|
||||
{$OPTIMIZATION NOREMOVEEMPTYPROCS}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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};
|
||||
|
@ -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 }
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user