FIX: High CPU load with Qt5 (workaround)

This commit is contained in:
Alexander Koblov 2017-06-04 10:53:35 +00:00
commit bdbb103cda
2 changed files with 43 additions and 0 deletions

View file

@ -175,6 +175,11 @@ if LCLWidgetType <> GetIDEValue('LCLWidgetType') then
begin
UnitPath += '$(FallbackOutputRoot)/LazControls/lib/$(TargetCPU)-$(TargetOS)/$(LCLWidgetType);';
UnitPath += '$(FallbackOutputRoot)/SynEdit/units/$(TargetCPU)-$(TargetOS)/$(LCLWidgetType);';
end;
if (LCLWidgetType = 'qt5') and (TargetOS <> 'darwin') then
begin
UnitPath += 'platform/$(SrcOS)/$(LCLWidgetType);';
end;"/>
<Parsing>
<SyntaxOptions>

View file

@ -0,0 +1,38 @@
unit Interfaces;
{$mode objfpc}{$H+}
interface
uses
InterfaceBase, qtint;
type
{ TQtWidgetSetEx }
TQtWidgetSetEx = Class(TQtWidgetSet)
public
procedure AppRun(const ALoop: TApplicationMainLoop); override;
end;
implementation
uses
Forms;
{ TQtWidgetSetEx }
procedure TQtWidgetSetEx.AppRun(const ALoop: TApplicationMainLoop);
begin
// Use LCL loop
if Assigned(ALoop) then ALoop;
end;
initialization
CreateWidgetset(TQtWidgetSetEx);
finalization
FreeWidgetset;
end.