Fix inhibit system functionality. Closes #766.

This commit is contained in:
sledgehammer999
2013-11-16 19:29:50 +02:00
parent 74869d87f6
commit 8f5a0a273f
3 changed files with 20 additions and 5 deletions

View File

@@ -1417,11 +1417,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