mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 13:41:26 -07:00
Prevent precise timers from being used when unnecessary
The implementation of QTimer::singleShot() uses Qt::PreciseTimer if interval is less than 2 seconds. This isn't mentioned in the docs. Qt::PreciseTimer increases the system's timer resolution which negatively affects power consumption. PR #18555. Closes #18350.
This commit is contained in:
parent
915121a0dd
commit
7600f59f3a
4 changed files with 4 additions and 4 deletions
|
@ -94,7 +94,7 @@ void AppController::shutdownAction()
|
|||
// Special handling for shutdown, we
|
||||
// need to reply to the Web UI before
|
||||
// actually shutting down.
|
||||
QTimer::singleShot(100ms, qApp, []()
|
||||
QTimer::singleShot(100ms, Qt::CoarseTimer, qApp, []
|
||||
{
|
||||
QCoreApplication::exit();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue