mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: High CPU load with Qt5 (workaround)
This commit is contained in:
parent
b5c17b860f
commit
bdbb103cda
2 changed files with 43 additions and 0 deletions
|
|
@ -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>
|
||||
|
|
|
|||
38
src/platform/unix/qt5/interfaces.pas
Normal file
38
src/platform/unix/qt5/interfaces.pas
Normal 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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue