mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
Fix sorting by port column in peers view.
This commit is contained in:
parent
91ec84b317
commit
e8cb840836
1 changed files with 2 additions and 2 deletions
|
@ -377,7 +377,7 @@ QStandardItem* PeerListWidget::addPeer(const QString& ip, const libtorrent::torr
|
||||||
m_listModel->insertRow(row);
|
m_listModel->insertRow(row);
|
||||||
m_listModel->setData(m_listModel->index(row, PeerListDelegate::IP), ip);
|
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::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);
|
m_listModel->setData(m_listModel->index(row, PeerListDelegate::IP_HIDDEN), ip);
|
||||||
if (m_displayFlags) {
|
if (m_displayFlags) {
|
||||||
const QIcon ico = GeoIPManager::CountryISOCodeToIcon(peer.country);
|
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));
|
m_listModel->setData(m_listModel->index(row, PeerListDelegate::CONNECTION), getConnectionString(peer));
|
||||||
QString flags, tooltip;
|
QString flags, tooltip;
|
||||||
getFlags(peer, 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), flags);
|
||||||
m_listModel->setData(m_listModel->index(row, PeerListDelegate::FLAGS), tooltip, Qt::ToolTipRole);
|
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));
|
m_listModel->setData(m_listModel->index(row, PeerListDelegate::CLIENT), misc::toQStringU(peer.client));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue