Browse Source

Fix sorting by port column in peers view.

adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
e8cb840836
  1. 4
      src/properties/peerlistwidget.cpp

4
src/properties/peerlistwidget.cpp

@ -377,7 +377,7 @@ QStandardItem* PeerListWidget::addPeer(const QString& ip, const libtorrent::torr @@ -377,7 +377,7 @@ QStandardItem* PeerListWidget::addPeer(const QString& ip, const libtorrent::torr
m_listModel->insertRow(row);
m_listModel->setData(m_listModel->index(row, PeerListDelegate::IP), ip);
m_listModel->setData(m_listModel->index(row, PeerListDelegate::IP), ip, Qt::ToolTipRole);
m_listModel->setData(m_listModel->index(row, PeerListDelegate::PORT), QString::number(peer.ip.port()));
m_listModel->setData(m_listModel->index(row, PeerListDelegate::PORT), peer.ip.port());
m_listModel->setData(m_listModel->index(row, PeerListDelegate::IP_HIDDEN), ip);
if (m_displayFlags) {
const QIcon ico = GeoIPManager::CountryISOCodeToIcon(peer.country);
@ -419,7 +419,7 @@ void PeerListWidget::updatePeer(const QString& ip, const libtorrent::torrent_sta @@ -419,7 +419,7 @@ void PeerListWidget::updatePeer(const QString& ip, const libtorrent::torrent_sta
m_listModel->setData(m_listModel->index(row, PeerListDelegate::CONNECTION), getConnectionString(peer));
QString flags, tooltip;
getFlags(peer, flags, tooltip);
m_listModel->setData(m_listModel->index(row, PeerListDelegate::PORT), QString::number(peer.ip.port()));
m_listModel->setData(m_listModel->index(row, PeerListDelegate::PORT), peer.ip.port());
m_listModel->setData(m_listModel->index(row, PeerListDelegate::FLAGS), flags);
m_listModel->setData(m_listModel->index(row, PeerListDelegate::FLAGS), tooltip, Qt::ToolTipRole);
m_listModel->setData(m_listModel->index(row, PeerListDelegate::CLIENT), misc::toQStringU(peer.client));

Loading…
Cancel
Save