summaryrefslogtreecommitdiffhomepage
path: root/compat/qhash.hpp
diff options
context:
space:
mode:
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);
+ }
+};
+}