mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 13:10:17 +02:00
Qt5: set main timer as QtPreciseTimer, prepare for use of native event filter under linux.
This commit is contained in:
parent
5ddc38fa2a
commit
b77d4fd672
@ -280,10 +280,15 @@ begin
|
||||
begin
|
||||
FMainTimerID := -1;
|
||||
ATimer := QTimer_Create(QCoreApplication_instance());
|
||||
if (StyleName = 'gtk') or (StyleName = 'gtk+') then
|
||||
QTimer_setInterval(ATimer, 1) {issue #31191}
|
||||
QTimer_setTimerType(ATimer, QtPreciseTimer);
|
||||
{$IFDEF HASX11}
|
||||
if (StyleName = 'gtk2') or (StyleName = 'gtk') then
|
||||
QTimer_setInterval(ATimer, 1)
|
||||
else
|
||||
QTimer_setInterval(ATimer, {$IFDEF QtCocoa}5{$ELSE} 0 {$ENDIF});
|
||||
QTimer_setInterval(ATimer, 0);
|
||||
{$ELSE}
|
||||
QTimer_setInterval(ATimer, {$IFDEF QtCocoa}5{$ELSE}0{$ENDIF});
|
||||
{$ENDIF}
|
||||
QTimer_start(ATimer);
|
||||
FMainTimerID := QTimer_timerId(ATimer);
|
||||
QApplication_exec();
|
||||
|
Loading…
Reference in New Issue
Block a user