mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
Made progress calculation more efficient in torrent content model
Stop to address issue #24.
This commit is contained in:
parent
f73f267997
commit
ca2a659970
4 changed files with 16 additions and 18 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue