mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 08:48:07 -06:00
Clean up code
This commit is contained in:
@@ -142,13 +142,14 @@ void TorrentContentModelFolder::recalculateProgress()
|
||||
qulonglong tSize = 0;
|
||||
qulonglong tRemaining = 0;
|
||||
foreach (TorrentContentModelItem *child, m_childItems) {
|
||||
if (child->priority() != prio::IGNORED) {
|
||||
if (child->itemType() == FolderType)
|
||||
static_cast<TorrentContentModelFolder *>(child)->recalculateProgress();
|
||||
tProgress += child->progress() * child->size();
|
||||
tSize += child->size();
|
||||
tRemaining += child->remaining();
|
||||
}
|
||||
if (child->priority() == prio::IGNORED)
|
||||
continue;
|
||||
|
||||
if (child->itemType() == FolderType)
|
||||
static_cast<TorrentContentModelFolder *>(child)->recalculateProgress();
|
||||
tProgress += child->progress() * child->size();
|
||||
tSize += child->size();
|
||||
tRemaining += child->remaining();
|
||||
}
|
||||
|
||||
if (!isRootItem() && (tSize > 0)) {
|
||||
|
||||
Reference in New Issue
Block a user