--- a/src/libtremotesf/stdutils.h +++ b/src/libtremotesf/stdutils.h @@ -25,26 +25,27 @@ #include #include +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) namespace std { template<> class hash { public: - size_t operator()(const QString& string) const + size_t operator()(const QString& string) const noexcept(noexcept(qHash(string))) { - return qHash(string); + return qHash(string, qHash(std::hash{}(0))); } }; template<> class hash { public: - size_t operator()(const QByteArray& bytes) const + size_t operator()(const QByteArray& bytes) const noexcept(noexcept(qHash(bytes))) { - return qHash(bytes); + return qHash(bytes, qHash(std::hash{}(0))); } }; } - +#endif namespace tremotesf {