Inhibit sleep regardless of activity

"Active torrents" is a somewhat unintuitive concept as a basis for
preventing sleep, as torrents can become active or inactive on the
network at any time. This brings some predictability to the inhibit
sleep option, and will inhibit sleep as long as there are unpaused
downloads or uploads, regardless of network activity.

Closes #1696, #4592, #4655, #7019, #7159, #7452
This commit is contained in:
Lukas Greib 2018-08-02 15:45:21 -04:00
parent e59841d35c
commit 48cd993c92
9 changed files with 72 additions and 36 deletions

View file

@ -173,8 +173,8 @@ private slots:
void on_actionDownloadFromURL_triggered();
void on_actionExit_triggered();
void on_actionLock_triggered();
// Check for active torrents and set preventing from suspend state
void checkForActiveTorrents();
// Check for unpaused downloading or seeding torrents and prevent system suspend/sleep according to preferences
void updatePowerManagementState();
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
void checkProgramUpdate();
#endif