mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Use hashing helpers provided by Qt6
This commit is contained in:
parent
b3fb6bd990
commit
154ee1a73e
4 changed files with 16 additions and 4 deletions
|
@ -366,12 +366,15 @@ Net::ServiceID Net::ServiceID::fromURL(const QUrl &url)
|
|||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
std::size_t Net::qHash(const ServiceID &serviceID, const std::size_t seed)
|
||||
{
|
||||
return qHashMulti(seed, serviceID.hostName, serviceID.port);
|
||||
}
|
||||
#else
|
||||
uint Net::qHash(const ServiceID &serviceID, const uint seed)
|
||||
#endif
|
||||
{
|
||||
return ::qHash(serviceID.hostName, seed) ^ ::qHash(serviceID.port);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool Net::operator==(const ServiceID &lhs, const ServiceID &rhs)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue