From e14ccf05534bbc2984b15f7f255adbffc4c7f769 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sat, 27 Feb 2021 17:48:33 +0100 Subject: [PATCH] Kill qHash(QPointF) QPointF operator== is fuzzy, hence it can't be hashed efficiently. Prevent the erroneous addition of the overload by client code by providing it as deleted. Change-Id: I2cfaaf5c2c8896ec9a7929f7c7bf52a912d0450f Reviewed-by: Thiago Macieira --- src/corelib/tools/qpoint.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/tools/qpoint.h b/src/corelib/tools/qpoint.h index b886ce3801..8fff462487 100644 --- a/src/corelib/tools/qpoint.h +++ b/src/corelib/tools/qpoint.h @@ -328,6 +328,8 @@ private: Q_DECLARE_TYPEINFO(QPointF, Q_RELOCATABLE_TYPE); +size_t qHash(QPointF, size_t seed = 0) = delete; + /***************************************************************************** QPointF stream functions *****************************************************************************/