summaryrefslogtreecommitdiffhomepage
path: root/compat/qhash.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-07-08 23:20:56 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-07-08 23:20:56 +0200
commit90940a774eab876c38d5cef981b4be5bae67a462 (patch)
tree2e60edc1719ffd53752a55a7f0444166965e90c5 /compat/qhash.hpp
parente3292e1ddaa8d69eb320d2700fc582b4675cf8ce (diff)
modernize only
Diffstat (limited to 'compat/qhash.hpp')
-rw-r--r--compat/qhash.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/compat/qhash.hpp b/compat/qhash.hpp
new file mode 100644
index 00000000..a9685007
--- /dev/null
+++ b/compat/qhash.hpp
@@ -0,0 +1,15 @@
+#pragma once
+
+#include <functional>
+#include <QString>
+#include <QHashFunctions>
+
+namespace std {
+template<> struct hash<QString>
+{
+ inline unsigned operator()(const QString& value) const
+ {
+ return qHash(value);
+ }
+};
+}