Don't reorder the torrents in the transfer list if not necessary

The current sorting algorithm is not stable and causes undesidered
rearrangements of the transfer list when different torrents have same
values in respect to the current sorting criterion. Fix this by using
the priority, the seed date and the hash of the torrents as fallback
values to determine the order.

Closes #2158.
Closes #2526.
This commit is contained in:
Gabriele
2015-02-10 17:25:17 +01:00
parent 1b2e65011d
commit 1f77a03eb6
2 changed files with 51 additions and 24 deletions

View File

@@ -50,6 +50,7 @@ public:
private:
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
bool lowerPositionThan(const QModelIndex &left, const QModelIndex &right) const;
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
bool matchStatusFilter(int sourceRow, const QModelIndex &sourceParent) const;