mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Simplify code
This commit is contained in:
parent
c61116882b
commit
061219d0a2
3 changed files with 63 additions and 78 deletions
|
@ -301,7 +301,7 @@ void PeerListWidget::copySelectedPeers()
|
|||
int row = m_proxyModel->mapToSource(index).row();
|
||||
QString ip = m_listModel->data(m_listModel->index(row, PeerListDelegate::IP_HIDDEN)).toString();
|
||||
QString myport = m_listModel->data(m_listModel->index(row, PeerListDelegate::PORT)).toString();
|
||||
if (ip.indexOf('.') == -1) // IPv6
|
||||
if (!ip.contains('.')) // IPv6
|
||||
selectedPeers << '[' + ip + "]:" + myport;
|
||||
else // IPv4
|
||||
selectedPeers << ip + ':' + myport;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue