mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Peers can now be sorted by country
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
- BUGFIX: Fix rounding issue in torrent progress display
|
- BUGFIX: Fix rounding issue in torrent progress display
|
||||||
- BUGFIX: Fix issue when altering files priorities of a seeding torrent
|
- BUGFIX: Fix issue when altering files priorities of a seeding torrent
|
||||||
- BUGFIX: Better fix for save path editing issues in torrent addition dialog
|
- BUGFIX: Better fix for save path editing issues in torrent addition dialog
|
||||||
|
- BUGFIX: Peers can now be sorted by country
|
||||||
|
|
||||||
* Tue Oct 19 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.7
|
* Tue Oct 19 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.7
|
||||||
- BUGFIX: Display the priority column when the queueing system gets enabled
|
- BUGFIX: Display the priority column when the queueing system gets enabled
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include "qinisettings.h"
|
#include "qinisettings.h"
|
||||||
|
|
||||||
PeerListWidget::PeerListWidget(PropertiesWidget *parent): properties(parent), display_flags(false) {
|
PeerListWidget::PeerListWidget(PropertiesWidget *parent): QTreeView(parent), properties(parent), display_flags(false) {
|
||||||
// Visual settings
|
// Visual settings
|
||||||
setRootIsDecorated(false);
|
setRootIsDecorated(false);
|
||||||
setItemsExpandable(false);
|
setItemsExpandable(false);
|
||||||
@@ -78,6 +78,9 @@ PeerListWidget::PeerListWidget(PropertiesWidget *parent): properties(parent), di
|
|||||||
loadSettings();
|
loadSettings();
|
||||||
// IP to Hostname resolver
|
// IP to Hostname resolver
|
||||||
updatePeerHostNameResolutionState();
|
updatePeerHostNameResolutionState();
|
||||||
|
// SIGNAL/SLOT
|
||||||
|
connect(header(), SIGNAL(sectionClicked(int)), SLOT(handleSortColumnChanged(int)));
|
||||||
|
handleSortColumnChanged(header()->sortIndicatorSection());
|
||||||
}
|
}
|
||||||
|
|
||||||
PeerListWidget::~PeerListWidget() {
|
PeerListWidget::~PeerListWidget() {
|
||||||
@@ -400,3 +403,13 @@ void PeerListWidget::handleResolved(QString ip, QString hostname) {
|
|||||||
//listModel->setData(listModel->index(item->row(), IP), hostname);
|
//listModel->setData(listModel->index(item->row(), IP), hostname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PeerListWidget::handleSortColumnChanged(int col)
|
||||||
|
{
|
||||||
|
if(col == 0) {
|
||||||
|
qDebug("Sorting by decoration");
|
||||||
|
proxyModel->setSortRole(Qt::ToolTipRole);
|
||||||
|
} else {
|
||||||
|
proxyModel->setSortRole(Qt::DisplayRole);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ protected slots:
|
|||||||
void limitUpRateSelectedPeers(QStringList peer_ips);
|
void limitUpRateSelectedPeers(QStringList peer_ips);
|
||||||
void limitDlRateSelectedPeers(QStringList peer_ips);
|
void limitDlRateSelectedPeers(QStringList peer_ips);
|
||||||
void banSelectedPeers(QStringList peer_ips);
|
void banSelectedPeers(QStringList peer_ips);
|
||||||
|
void handleSortColumnChanged(int col);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QStandardItemModel *listModel;
|
QStandardItemModel *listModel;
|
||||||
|
|||||||
Reference in New Issue
Block a user