diff base/Event.h @ 1799:8c34ecba70df

Compatibility with Qt 5.2 (for the Ubuntu 14.04 build)
author Chris Cannam
date Thu, 10 Oct 2019 09:12:12 +0100
parents baafe1bb7e51
children 705ea8699d49
line wrap: on
line diff
--- a/base/Event.h	Tue Oct 01 11:22:48 2019 +0100
+++ b/base/Event.h	Thu Oct 10 09:12:12 2019 +0100
@@ -385,6 +385,16 @@
         return list.join(delimiter);
     }
 
+#if (QT_VERSION < QT_VERSION_CHECK(5, 3, 0))
+private:
+    uint qHash(float key, uint seed) const {
+        return key != 0.0f ?
+            qHash(reinterpret_cast<const uchar *>(&key), sizeof(key), seed) :
+            seed;
+    }
+public:
+#endif
+    
     uint hash(uint seed = 0) const {
         uint h = qHash(m_label, seed);
         if (m_haveValue) h ^= qHash(m_value);