mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-28 05:27:15 +03:00
Put torrents with invalid "Last Activity" value at the bottom of the list
Closes #2809.
This commit is contained in:
parent
98350bae5d
commit
0a51b57a54
1 changed files with 9 additions and 0 deletions
|
@ -218,6 +218,15 @@ bool TransferListSortModel::lessThan(const QModelIndex &left, const QModelIndex
|
||||||
return !invalidL;
|
return !invalidL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (column == TorrentModelItem::TR_LAST_ACTIVITY) {
|
||||||
|
const qlonglong vL = left.data().toLongLong();
|
||||||
|
const qlonglong vR = right.data().toLongLong();
|
||||||
|
|
||||||
|
if (vL == -1) return false;
|
||||||
|
if (vR == -1) return true;
|
||||||
|
|
||||||
|
return vL < vR;
|
||||||
|
}
|
||||||
|
|
||||||
return QSortFilterProxyModel::lessThan(left, right);
|
return QSortFilterProxyModel::lessThan(left, right);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue