From 904ebd5a8ad3e2edc60db8852ef9a5af623321b1 Mon Sep 17 00:00:00 2001 From: "R. van Twisk" Date: Wed, 25 Dec 2019 14:06:05 +0100 Subject: qhash fix for build on qt 5.14 --- compat/qhash.hpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/compat/qhash.hpp b/compat/qhash.hpp index c2be4fc5..72c5e7cd 100644 --- a/compat/qhash.hpp +++ b/compat/qhash.hpp @@ -1,14 +1,17 @@ #pragma once +#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0)) +#include #include -#include +#include namespace std { -template<> struct hash -{ - unsigned operator()(const QString& value) const - { - return qHash(value); + template<> struct hash { + size_t operator()(const QString& s) const noexcept { + return (size_t) qHash(s); } -}; + }; } +#else +#include +#endif \ No newline at end of file -- cgit v1.2.3