mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Rename isSeed to isFinished to correctly represent its meaning
PR #18580.
This commit is contained in:
committed by
GitHub
parent
4c0ebc0e0f
commit
1e913f46f0
@@ -1906,11 +1906,11 @@ void MainWindow::updatePowerManagementState()
|
||||
const QVector<BitTorrent::Torrent *> allTorrents = BitTorrent::Session::instance()->torrents();
|
||||
const bool hasUnfinishedTorrents = std::any_of(allTorrents.cbegin(), allTorrents.cend(), [](const BitTorrent::Torrent *torrent)
|
||||
{
|
||||
return (!torrent->isSeed() && !torrent->isPaused() && !torrent->isErrored() && torrent->hasMetadata());
|
||||
return (!torrent->isFinished() && !torrent->isPaused() && !torrent->isErrored() && torrent->hasMetadata());
|
||||
});
|
||||
const bool hasRunningSeed = std::any_of(allTorrents.cbegin(), allTorrents.cend(), [](const BitTorrent::Torrent *torrent)
|
||||
{
|
||||
return (torrent->isSeed() && !torrent->isPaused());
|
||||
return (torrent->isFinished() && !torrent->isPaused());
|
||||
});
|
||||
const bool inhibitSuspend = (Preferences::instance()->preventFromSuspendWhenDownloading() && hasUnfinishedTorrents)
|
||||
|| (Preferences::instance()->preventFromSuspendWhenSeeding() && hasRunningSeed);
|
||||
|
||||
Reference in New Issue
Block a user