mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -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 <algorithm>
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QHeaderView>
|
||||
@@ -70,7 +71,11 @@ bool operator==(const PeerEndpoint &left, const PeerEndpoint &right)
|
||||
return (left.address == right.address) && (left.connectionType == right.connectionType);
|
||||
}
|
||||
|
||||
uint qHash(const PeerEndpoint &peerEndpoint, const uint seed)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
std::size_t qHash(const PeerEndpoint &peerEndpoint, const std::size_t seed = 0)
|
||||
#else
|
||||
uint qHash(const PeerEndpoint &peerEndpoint, const uint seed = 0)
|
||||
#endif
|
||||
{
|
||||
return (qHash(peerEndpoint.address, seed) ^ ::qHash(peerEndpoint.connectionType));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user