mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 23:47:23 -06:00
Update function signature for Qt6 qHash()
Since the `qhash()` signature has changed in Qt6.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
|
||||
#include <libtorrent/sha1_hash.hpp>
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QByteArray>
|
||||
#include <QHash>
|
||||
#include <QSharedData>
|
||||
@@ -131,7 +132,11 @@ bool operator<(const Digest32<N> &left, const Digest32<N> &right)
|
||||
}
|
||||
|
||||
template <int N>
|
||||
uint qHash(const Digest32<N> &key, const uint seed)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
std::size_t qHash(const Digest32<N> &key, const std::size_t seed = 0)
|
||||
#else
|
||||
uint qHash(const Digest32<N> &key, const uint seed = 0)
|
||||
#endif
|
||||
{
|
||||
return ::qHash(std::hash<typename Digest32<N>::UnderlyingType>()(key), seed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user