mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 07:20:23 +02:00
lcl: add Widgetset.LCLCapability function and a set for it with only one member for now lcAsyncProcess
ide: don't use AsyncProcess if widgetset is not capable to handle it (this fixes issues with compiling in qt and gtk2 ide under windows) git-svn-id: trunk@14710 -
This commit is contained in:
parent
fb8f454251
commit
86f7687fe9
@ -376,7 +376,7 @@ var
|
||||
FIFOption: TLazFindInFileSearchOption;
|
||||
begin
|
||||
// Find- and replace-history
|
||||
fMaxFindHistory:=XMLConfig.GetValue(Path+'Find/History/Max',FMaxFindHistory);
|
||||
FMaxFindHistory:=XMLConfig.GetValue(Path+'Find/History/Max',FMaxFindHistory);
|
||||
LoadRecentList(XMLConfig,FFindHistory,Path+'Find/History/Find/');
|
||||
LoadRecentList(XMLConfig,FReplaceHistory,Path+'Find/History/Replace/');
|
||||
LoadRecentList(XMLConfig,FFindInFilesPathHistory,Path+
|
||||
|
@ -1089,9 +1089,12 @@ begin
|
||||
SetupDialogs;
|
||||
RunExternalTool:=@OnRunExternalTool;
|
||||
{$IFDEF UseAsyncProcess}
|
||||
TOutputFilterProcess:=TAsyncProcess;
|
||||
if Widgetset.LCLCapability(lcAsyncProcess) = 1 then
|
||||
TOutputFilterProcess := TAsyncProcess
|
||||
else
|
||||
TOutputFilterProcess := TProcess;
|
||||
{$ELSE}
|
||||
TOutputFilterProcess:=TProcess;
|
||||
TOutputFilterProcess := TProcess;
|
||||
{$ENDIF}
|
||||
|
||||
MainBuildBoss:=TBuildManager.Create;
|
||||
|
@ -53,3 +53,9 @@ procedure TWidgetSet.AppSetTitle(const ATitle: string);
|
||||
begin
|
||||
Debugln('TWidgetSet.AppSetTitle not implemented by ', ClassName);
|
||||
end;
|
||||
|
||||
function TWidgetSet.LCLCapability(ACapability: TLCLCapability): PtrUInt;
|
||||
begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
|
@ -67,6 +67,10 @@ type
|
||||
|
||||
TLCLPlatforms = set of TLCLPlatform;
|
||||
|
||||
TLCLCapability = (
|
||||
lcAsyncProcess // support for async process
|
||||
);
|
||||
|
||||
{ TWidgetSet }
|
||||
|
||||
TWidgetSet = class(TObject)
|
||||
@ -89,6 +93,7 @@ type
|
||||
procedure AppSetTitle(const ATitle: string); virtual;
|
||||
|
||||
function LCLPlatform: TLCLPlatform; virtual; abstract;
|
||||
function LCLCapability(ACapability: TLCLCapability): PtrUInt; virtual;
|
||||
|
||||
function DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor; virtual; abstract;
|
||||
procedure DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor); virtual; abstract;
|
||||
|
@ -181,6 +181,7 @@ type
|
||||
destructor Destroy; override;
|
||||
|
||||
function LCLPlatform: TLCLPlatform; override;
|
||||
function LCLCapability(ACapability: TLCLCapability): PtrUInt; override;
|
||||
|
||||
{ Initialize the API }
|
||||
procedure AppInit(var ScreenInfo: TScreenInfo); override;
|
||||
|
@ -410,6 +410,15 @@ begin
|
||||
Result:= lpWin32;
|
||||
end;
|
||||
|
||||
function TWin32WidgetSet.LCLCapability(ACapability: TLCLCapability): PtrUInt;
|
||||
begin
|
||||
case ACapability of
|
||||
lcAsyncProcess: Result := 1;
|
||||
else
|
||||
Result := inherited;
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function: CreateTimer
|
||||
Params: Interval:
|
||||
|
Loading…
Reference in New Issue
Block a user