mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Improve removeIf() to support set types
We can now replace QMutable*Iterator by removeIf() which usage is more consistent with other algorithm functions.
This commit is contained in:
parent
4ed8b31641
commit
c6f3da1097
7 changed files with 60 additions and 31 deletions
|
@ -364,9 +364,7 @@ void PeerListWidget::loadPeers(BitTorrent::TorrentHandle *const torrent, bool fo
|
|||
}
|
||||
}
|
||||
// Delete peers that are gone
|
||||
QSetIterator<QString> it(oldPeersSet);
|
||||
while (it.hasNext()) {
|
||||
const QString &ip = it.next();
|
||||
for (const QString &ip : oldPeersSet) {
|
||||
m_missingFlags.remove(ip);
|
||||
m_peerAddresses.remove(ip);
|
||||
QStandardItem *item = m_peerItems.take(ip);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue