From c8d51e91f415dcef4ce77569cb8d9ac794c41c5f Mon Sep 17 00:00:00 2001 From: Nick Tiskov Date: Sat, 6 Jul 2013 04:07:09 +0400 Subject: [PATCH] Remove obsolete IP_HIDDEN column from peer list. --- src/properties/peerlistdelegate.h | 2 +- src/properties/peerlistwidget.cpp | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/properties/peerlistdelegate.h b/src/properties/peerlistdelegate.h index 91120d1ef..fd66636ec 100644 --- a/src/properties/peerlistdelegate.h +++ b/src/properties/peerlistdelegate.h @@ -40,7 +40,7 @@ class PeerListDelegate: public QItemDelegate { public: enum PeerListColumns {COUNTRY, IP, CONNECTION, FLAGS, CLIENT, PROGRESS, DOWN_SPEED, UP_SPEED, - TOT_DOWN, TOT_UP, IP_HIDDEN, COL_COUNT}; + TOT_DOWN, TOT_UP, COL_COUNT}; public: PeerListDelegate(QObject *parent) : QItemDelegate(parent) {} diff --git a/src/properties/peerlistwidget.cpp b/src/properties/peerlistwidget.cpp index 358260da9..2ce1d4a6b 100644 --- a/src/properties/peerlistwidget.cpp +++ b/src/properties/peerlistwidget.cpp @@ -79,16 +79,15 @@ PeerListWidget::PeerListWidget(PropertiesWidget *parent): //Explicitly set the column visibility. When columns are added/removed //between versions this prevents some of them being hidden due to //incorrect restoreState() being used. - for (unsigned int i=0; imapToSource(index).row(); - QString myip = m_listModel->data(m_listModel->index(row, PeerListDelegate::IP_HIDDEN)).toString(); + QString myip = m_listModel->data(m_listModel->index(row, PeerListDelegate::IP)).toString(); selectedPeerIPs << myip; } // Add Peer Action @@ -369,7 +368,6 @@ QStandardItem* PeerListWidget::addPeer(const QString& ip, const peer_info& peer) // Adding Peer to peer list m_listModel->insertRow(row); m_listModel->setData(m_listModel->index(row, PeerListDelegate::IP), ip); - m_listModel->setData(m_listModel->index(row, PeerListDelegate::IP_HIDDEN), ip); if (m_displayFlags) { const QIcon ico = GeoIPManager::CountryISOCodeToIcon(peer.country); if (!ico.isNull()) {