mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Made progress calculation more efficient in torrent content model
Stop to address issue #24.
This commit is contained in:
@@ -69,15 +69,12 @@ void TorrentContentModelFile::setPriority(int new_prio, bool update_parent)
|
||||
m_priority = new_prio;
|
||||
|
||||
// Update parent
|
||||
if (update_parent) {
|
||||
m_parentItem->updateProgress();
|
||||
if (update_parent)
|
||||
m_parentItem->updatePriority();
|
||||
}
|
||||
}
|
||||
|
||||
void TorrentContentModelFile::setProgress(qulonglong done)
|
||||
{
|
||||
m_totalDone = done;
|
||||
Q_ASSERT(m_totalDone <= m_size);
|
||||
m_parentItem->updateProgress();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user