mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
Use hashing helpers provided by Qt6
This commit is contained in:
@@ -38,9 +38,12 @@ bool BitTorrent::operator==(const TrackerEntry &left, const TrackerEntry &right)
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
std::size_t BitTorrent::qHash(const TrackerEntry &key, const std::size_t seed)
|
||||
{
|
||||
return qHashMulti(seed, key.url, key.tier);
|
||||
}
|
||||
#else
|
||||
uint BitTorrent::qHash(const TrackerEntry &key, const uint seed)
|
||||
#endif
|
||||
{
|
||||
return (::qHash(key.url, seed) ^ ::qHash(key.tier));
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user