mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-08 16:42:30 -06:00
Update function signature for Qt6 qHash()
Since the `qhash()` signature has changed in Qt6.
This commit is contained in:
@@ -364,7 +364,11 @@ Net::ServiceID Net::ServiceID::fromURL(const QUrl &url)
|
||||
return {url.host(), url.port(80)};
|
||||
}
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
std::size_t Net::qHash(const ServiceID &serviceID, const std::size_t seed)
|
||||
#else
|
||||
uint Net::qHash(const ServiceID &serviceID, const uint seed)
|
||||
#endif
|
||||
{
|
||||
return ::qHash(serviceID.hostName, seed) ^ ::qHash(serviceID.port);
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QHash>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QObject>
|
||||
@@ -52,7 +53,11 @@ namespace Net
|
||||
static ServiceID fromURL(const QUrl &url);
|
||||
};
|
||||
|
||||
uint qHash(const ServiceID &serviceID, uint seed);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
std::size_t qHash(const ServiceID &serviceID, std::size_t seed = 0);
|
||||
#else
|
||||
uint qHash(const ServiceID &serviceID, uint seed = 0);
|
||||
#endif
|
||||
bool operator==(const ServiceID &lhs, const ServiceID &rhs);
|
||||
|
||||
enum class DownloadStatus
|
||||
|
||||
Reference in New Issue
Block a user