Update function signature for Qt6 qHash()

Since the `qhash()` signature has changed in Qt6.
This commit is contained in:
Chocobo1
2022-03-12 20:59:29 +08:00
parent 8de966ea88
commit 926d51839f
17 changed files with 87 additions and 10 deletions

View File

@@ -36,7 +36,11 @@ bool BitTorrent::operator==(const TrackerEntry &left, const TrackerEntry &right)
&& QUrl(left.url) == QUrl(right.url));
}
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
std::size_t BitTorrent::qHash(const TrackerEntry &key, const std::size_t seed)
#else
uint BitTorrent::qHash(const TrackerEntry &key, const uint seed)
#endif
{
return (::qHash(key.url, seed) ^ ::qHash(key.tier));
}