|
|
|
@ -313,7 +313,8 @@ void PeerListWidget::loadPeers(const QTorrentHandle &h, bool force_hostname_reso
@@ -313,7 +313,8 @@ void PeerListWidget::loadPeers(const QTorrentHandle &h, bool force_hostname_reso
|
|
|
|
|
if(host.isNull()) { |
|
|
|
|
resolver->resolve(peer.ip); |
|
|
|
|
} else { |
|
|
|
|
peerItems.value(peer_ip)->setData(host); |
|
|
|
|
qDebug("Got peer IP from cache"); |
|
|
|
|
handleResolved(peer_ip, host); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -394,6 +395,8 @@ void PeerListWidget::updatePeer(QString ip, peer_info peer) {
@@ -394,6 +395,8 @@ void PeerListWidget::updatePeer(QString ip, peer_info peer) {
|
|
|
|
|
void PeerListWidget::handleResolved(QString ip, QString hostname) { |
|
|
|
|
QStandardItem *item = peerItems.value(ip, 0); |
|
|
|
|
if(item) { |
|
|
|
|
qDebug("Resolved %s -> %s", qPrintable(ip), qPrintable(hostname)); |
|
|
|
|
item->setData(hostname); |
|
|
|
|
//listModel->setData(listModel->index(item->row(), IP), hostname);
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|