changeset 1800:705ea8699d49

OK, that didn't work because of scoping/overload rules. Try this
author Chris Cannam
date Thu, 10 Oct 2019 09:18:37 +0100
parents 8c34ecba70df
children af3f6c411a8e
files base/Event.h
diffstat 1 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/base/Event.h	Thu Oct 10 09:12:12 2019 +0100
+++ b/base/Event.h	Thu Oct 10 09:18:37 2019 +0100
@@ -26,6 +26,14 @@
 
 #include <QString>
 
+#if (QT_VERSION < QT_VERSION_CHECK(5, 3, 0))
+uint qHash(float key, uint seed) {
+    return key != 0.0f ?
+        qHash(reinterpret_cast<const uchar *>(&key), sizeof(key), seed) :
+        seed;
+}
+#endif
+
 /**
  * An immutable(-ish) type used for point and event representation in
  * sparse models, as well as for interchange within the clipboard. An
@@ -384,16 +392,6 @@
         
         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);