From efed388402e15b3c3445b3271816fa8d793cd41e Mon Sep 17 00:00:00 2001 From: Eugene Shalygin Date: Tue, 8 Dec 2015 14:11:58 +0100 Subject: [PATCH] Revert "Remove unused parameter." This reverts commit 87347cf0e53756f6e1a2e4984e167e4be5bbd06f. --- src/gui/properties/peerlistwidget.cpp | 8 ++++---- src/gui/properties/peerlistwidget.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/properties/peerlistwidget.cpp b/src/gui/properties/peerlistwidget.cpp index 96fefa3b4..14729cb38 100644 --- a/src/gui/properties/peerlistwidget.cpp +++ b/src/gui/properties/peerlistwidget.cpp @@ -282,14 +282,14 @@ void PeerListWidget::loadPeers(BitTorrent::TorrentHandle *const torrent, bool fo QString peerIp = addr.ip.toString(); if (m_peerItems.contains(peerIp)) { // Update existing peer - updatePeer(peerIp, peer); + updatePeer(peerIp, torrent, peer); oldeersSet.remove(peerIp); if (forceHostnameResolution && m_resolver) m_resolver->resolve(peerIp); } else { // Add new peer - m_peerItems[peerIp] = addPeer(peerIp, peer); + m_peerItems[peerIp] = addPeer(peerIp, torrent, peer); m_peerAddresses[peerIp] = addr; // Resolve peer host name is asked if (m_resolver) @@ -307,7 +307,7 @@ void PeerListWidget::loadPeers(BitTorrent::TorrentHandle *const torrent, bool fo } } -QStandardItem* PeerListWidget::addPeer(const QString &ip, const BitTorrent::PeerInfo &peer) +QStandardItem* PeerListWidget::addPeer(const QString& ip, BitTorrent::TorrentHandle *const torrent, const BitTorrent::PeerInfo &peer) { int row = m_listModel->rowCount(); // Adding Peer to peer list @@ -340,7 +340,7 @@ QStandardItem* PeerListWidget::addPeer(const QString &ip, const BitTorrent::Peer return m_listModel->item(row, PeerListDelegate::IP); } -void PeerListWidget::updatePeer(const QString &ip, const BitTorrent::PeerInfo &peer) +void PeerListWidget::updatePeer(const QString &ip, BitTorrent::TorrentHandle *const torrent, const BitTorrent::PeerInfo &peer) { QStandardItem *item = m_peerItems.value(ip); int row = item->row(); diff --git a/src/gui/properties/peerlistwidget.h b/src/gui/properties/peerlistwidget.h index 7ec0669fe..d73037b34 100644 --- a/src/gui/properties/peerlistwidget.h +++ b/src/gui/properties/peerlistwidget.h @@ -68,8 +68,8 @@ public: ~PeerListWidget(); void loadPeers(BitTorrent::TorrentHandle *const torrent, bool forceHostnameResolution = false); - QStandardItem *addPeer(const QString &ip, const BitTorrent::PeerInfo &peer); - void updatePeer(const QString &ip, const BitTorrent::PeerInfo &peer); + QStandardItem *addPeer(const QString &ip, BitTorrent::TorrentHandle *const torrent, const BitTorrent::PeerInfo &peer); + void updatePeer(const QString &ip, BitTorrent::TorrentHandle *const torrent, const BitTorrent::PeerInfo &peer); void updatePeerHostNameResolutionState(); void updatePeerCountryResolutionState(); void clear();