mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 21:14:33 +00:00
Reorder peer flags
Now we group related flags nearby.
This commit is contained in:
parent
e38128119c
commit
cb8d6a0939
@ -291,6 +291,14 @@ void PeerInfo::determineFlags()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// K = Peer is unchoking your client, but your client is not interested
|
||||||
|
if (!isRemoteChocked() && !isInteresting())
|
||||||
|
updateFlags(QLatin1Char('K'), tr("Not interested (local) and unchoked (peer)"));
|
||||||
|
|
||||||
|
// ? = Your client unchoked the peer but the peer is not interested
|
||||||
|
if (!isChocked() && !isRemoteInterested())
|
||||||
|
updateFlags(QLatin1Char('?'), tr("Not interested (peer) and unchoked (local)"));
|
||||||
|
|
||||||
// O = Optimistic unchoke
|
// O = Optimistic unchoke
|
||||||
if (optimisticUnchoke())
|
if (optimisticUnchoke())
|
||||||
updateFlags(QLatin1Char('O'), tr("Optimistic unchoke"));
|
updateFlags(QLatin1Char('O'), tr("Optimistic unchoke"));
|
||||||
@ -303,21 +311,17 @@ void PeerInfo::determineFlags()
|
|||||||
if (!isLocalConnection())
|
if (!isLocalConnection())
|
||||||
updateFlags(QLatin1Char('I'), tr("Incoming connection"));
|
updateFlags(QLatin1Char('I'), tr("Incoming connection"));
|
||||||
|
|
||||||
// K = Peer is unchoking your client, but your client is not interested
|
// H = Peer was obtained through DHT
|
||||||
if (!isRemoteChocked() && !isInteresting())
|
if (fromDHT())
|
||||||
updateFlags(QLatin1Char('K'), tr("Not interested (local) and unchoked (peer)"));
|
updateFlags(QLatin1Char('H'), tr("Peer from DHT"));
|
||||||
|
|
||||||
// ? = Your client unchoked the peer but the peer is not interested
|
|
||||||
if (!isChocked() && !isRemoteInterested())
|
|
||||||
updateFlags(QLatin1Char('?'), tr("Not interested (peer) and unchoked (local)"));
|
|
||||||
|
|
||||||
// X = Peer was included in peerlists obtained through Peer Exchange (PEX)
|
// X = Peer was included in peerlists obtained through Peer Exchange (PEX)
|
||||||
if (fromPeX())
|
if (fromPeX())
|
||||||
updateFlags(QLatin1Char('X'), tr("Peer from PEX"));
|
updateFlags(QLatin1Char('X'), tr("Peer from PEX"));
|
||||||
|
|
||||||
// H = Peer was obtained through DHT
|
// L = Peer is local
|
||||||
if (fromDHT())
|
if (fromLSD())
|
||||||
updateFlags(QLatin1Char('H'), tr("Peer from DHT"));
|
updateFlags(QLatin1Char('L'), tr("Peer from LSD"));
|
||||||
|
|
||||||
// E = Peer is using Protocol Encryption (all traffic)
|
// E = Peer is using Protocol Encryption (all traffic)
|
||||||
if (isRC4Encrypted())
|
if (isRC4Encrypted())
|
||||||
@ -331,10 +335,6 @@ void PeerInfo::determineFlags()
|
|||||||
if (useUTPSocket())
|
if (useUTPSocket())
|
||||||
updateFlags(QLatin1Char('P'), QString::fromUtf8(C_UTP));
|
updateFlags(QLatin1Char('P'), QString::fromUtf8(C_UTP));
|
||||||
|
|
||||||
// L = Peer is local
|
|
||||||
if (fromLSD())
|
|
||||||
updateFlags(QLatin1Char('L'), tr("Peer from LSD"));
|
|
||||||
|
|
||||||
m_flags.chop(1);
|
m_flags.chop(1);
|
||||||
m_flagsDescription.chop(1);
|
m_flagsDescription.chop(1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user