diff options
| author | R. van Twisk <ries.van.twisk@ing.com> | 2019-12-25 14:06:05 +0100 | 
|---|---|---|
| committer | R. van Twisk <ries.van.twisk@ing.com> | 2019-12-25 14:06:05 +0100 | 
| commit | 904ebd5a8ad3e2edc60db8852ef9a5af623321b1 (patch) | |
| tree | cf0578e789afaa43b0351942efe33d62126e079d /compat | |
| parent | 338b007abe10faa7ecf6004f1162b7a85d30f8f0 (diff) | |
qhash fix for build on qt 5.14
Diffstat (limited to 'compat')
| -rw-r--r-- | compat/qhash.hpp | 17 | 
1 files 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 <QHash>  #include <QString> -#include <QHashFunctions> +#include <functional>  namespace std { -template<> struct hash<QString> -{ -    unsigned operator()(const QString& value) const -    { -        return qHash(value); +  template<> struct hash<QString> { +    size_t operator()(const QString& s) const noexcept { +      return (size_t) qHash(s);      } -}; +  };  } +#else +#include <QHashFunctions> +#endif
\ No newline at end of file | 
