# HG changeset patch # User Chris Cannam # Date 1570696452 -3600 # Node ID af3f6c411a8ee7e255a1dd4384de14e5d4e387ce # Parent 705ea8699d49c3cc978c477d5191f1f72c2234f9 *sigh* diff -r 705ea8699d49 -r af3f6c411a8e base/Event.h --- a/base/Event.h Thu Oct 10 09:18:37 2019 +0100 +++ b/base/Event.h Thu Oct 10 09:34:12 2019 +0100 @@ -28,9 +28,12 @@ #if (QT_VERSION < QT_VERSION_CHECK(5, 3, 0)) uint qHash(float key, uint seed) { - return key != 0.0f ? - qHash(reinterpret_cast(&key), sizeof(key), seed) : - seed; + uint h = seed; + const uchar *p = reinterpret_cast(&key); + for (size_t i = 0; i < sizeof(key); ++i) { + h = 31 * h + p[i]; + } + return h; } #endif