summarylogtreecommitdiffstats
path: root/qt-5.14.patch
blob: 9e8399170204aaf93e018046bb6c10d6e24aaebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- a/src/libtremotesf/stdutils.h
+++ b/src/libtremotesf/stdutils.h
@@ -25,26 +25,27 @@
 #include <QHash>
 #include <QString>
 
+#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
 namespace std {
     template<>
     class hash<QString> {
     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<int>{}(0)));
         }
     };
 
     template<>
     class hash<QByteArray> {
     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<int>{}(0)));
         }
     };
 }
-
+#endif
 
 namespace tremotesf
 {