mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-14 16:57:55 +00:00
- A little list refresh optimizing
This commit is contained in:
parent
81aac9ebcc
commit
fa05441e74
@ -236,6 +236,7 @@ void FinishedTorrents::updateTorrent(QTorrentHandle h) {
|
|||||||
row = getRowFromHash(hash);
|
row = getRowFromHash(hash);
|
||||||
}
|
}
|
||||||
Q_ASSERT(row != -1);
|
Q_ASSERT(row != -1);
|
||||||
|
if(h.is_paused()) return;
|
||||||
// Update queued torrent
|
// Update queued torrent
|
||||||
if(BTSession->isQueueingEnabled() && h.is_queued()) {
|
if(BTSession->isQueueingEnabled() && h.is_queued()) {
|
||||||
if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking){
|
if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking){
|
||||||
@ -249,7 +250,6 @@ void FinishedTorrents::updateTorrent(QTorrentHandle h) {
|
|||||||
setRowColor(row, QString::fromUtf8("grey"));
|
setRowColor(row, QString::fromUtf8("grey"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(h.is_paused()) return;
|
|
||||||
if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking){
|
if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking){
|
||||||
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
|
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
|
||||||
setRowColor(row, QString::fromUtf8("grey"));
|
setRowColor(row, QString::fromUtf8("grey"));
|
||||||
|
@ -496,6 +496,8 @@ bool DownloadingTorrents::updateTorrent(QTorrentHandle h) {
|
|||||||
added = true;
|
added = true;
|
||||||
}
|
}
|
||||||
Q_ASSERT(row != -1);
|
Q_ASSERT(row != -1);
|
||||||
|
// No need to update a paused torrent
|
||||||
|
if(h.is_paused()) return added;
|
||||||
// Update Priority
|
// Update Priority
|
||||||
if(BTSession->isQueueingEnabled()) {
|
if(BTSession->isQueueingEnabled()) {
|
||||||
DLListModel->setData(DLListModel->index(row, PRIORITY), QVariant((int)BTSession->getDlTorrentPriority(hash)));
|
DLListModel->setData(DLListModel->index(row, PRIORITY), QVariant((int)BTSession->getDlTorrentPriority(hash)));
|
||||||
@ -519,8 +521,6 @@ bool DownloadingTorrents::updateTorrent(QTorrentHandle h) {
|
|||||||
return added;
|
return added;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// No need to update a paused torrent
|
|
||||||
if(h.is_paused()) return added;
|
|
||||||
// Parse download state
|
// Parse download state
|
||||||
// Setting download state
|
// Setting download state
|
||||||
switch(h.state()) {
|
switch(h.state()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user