mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
Stop updating file priorities regularly in torrent content panel
Performance improvement to address issue #24.
This commit is contained in:
parent
c43c362903
commit
00945e5749
1 changed files with 6 additions and 1 deletions
|
@ -259,6 +259,8 @@ void PropertiesWidget::loadTorrentInfos(const QTorrentHandle& _h)
|
||||||
// List files in torrent
|
// List files in torrent
|
||||||
PropListModel->model()->setupModelData(h.get_torrent_info());
|
PropListModel->model()->setupModelData(h.get_torrent_info());
|
||||||
filesList->setExpanded(PropListModel->index(0, 0), true);
|
filesList->setExpanded(PropListModel->index(0, 0), true);
|
||||||
|
// Load file priorities
|
||||||
|
PropListModel->model()->updateFilesPriorities(h.file_priorities());
|
||||||
}
|
}
|
||||||
} catch(const invalid_handle& e) { }
|
} catch(const invalid_handle& e) { }
|
||||||
// Load dynamic data
|
// Load dynamic data
|
||||||
|
@ -388,8 +390,11 @@ void PropertiesWidget::loadDynamicData() {
|
||||||
filesList->setUpdatesEnabled(false);
|
filesList->setUpdatesEnabled(false);
|
||||||
std::vector<size_type> fp;
|
std::vector<size_type> fp;
|
||||||
h.file_progress(fp);
|
h.file_progress(fp);
|
||||||
PropListModel->model()->updateFilesPriorities(h.file_priorities());
|
|
||||||
PropListModel->model()->updateFilesProgress(fp);
|
PropListModel->model()->updateFilesProgress(fp);
|
||||||
|
// XXX: We don't update file priorities regularly for performance
|
||||||
|
// reasons. This means that priorities will not be updated if
|
||||||
|
// set from the Web UI.
|
||||||
|
// PropListModel->model()->updateFilesPriorities(h.file_priorities());
|
||||||
filesList->setUpdatesEnabled(true);
|
filesList->setUpdatesEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue