mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Fix inhibit system functionality. Closes #766.
This commit is contained in:
parent
ad69cbb318
commit
f09328c13c
3 changed files with 20 additions and 5 deletions
|
@ -1409,11 +1409,7 @@ void MainWindow::on_actionAutoShutdown_system_toggled(bool enabled)
|
|||
|
||||
void MainWindow::checkForActiveTorrents()
|
||||
{
|
||||
const TorrentStatusReport report = transferList->getSourceModel()->getTorrentStatusReport();
|
||||
if (report.nb_active > 0) // Active torrents are present; prevent system from suspend
|
||||
m_pwr->setActivityState(true);
|
||||
else
|
||||
m_pwr->setActivityState(false);
|
||||
m_pwr->setActivityState(transferList->getSourceModel()->inhibitSystem());
|
||||
}
|
||||
|
||||
QIcon MainWindow::getSystrayIcon() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue