From e8cb8408364cb2b65f3bbe37189fcaf83b49065f Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Fri, 26 Dec 2014 16:59:36 +0200 Subject: [PATCH] Fix sorting by port column in peers view. --- src/properties/peerlistwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/properties/peerlistwidget.cpp b/src/properties/peerlistwidget.cpp index 13ffc2d57..f82bb2d58 100644 --- a/src/properties/peerlistwidget.cpp +++ b/src/properties/peerlistwidget.cpp @@ -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 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));