qt5base-lts/tests/auto/corelib
Marc Mutz c0791ac76e Add qHash() overloads for floating-point types
This implementation is based on GCC's implementation of std::hash<FP>, but only
to the extent of checking for zero before hashing the bits. The bit hasher is
the Qt one; I didn't even look what GCC uses.

The check against 0.0 is mandated by the requirement to have
  \forall x,y: x == y => qHash(x) == qHash(y)
which would be violated for x = 0.0 and y = -0.0 if we only hashed the bits.

Implemented out-of-line to avoid potential FP-comparison warnings, as well
as to be able to use the file-static hash() functions, which gets inlined
unlike qHashBits(), which cannot be.

[ChangeLog][QtCore][QHash/QSet] Allowed to use float, double and long double
as QHash/QSet keys.

Change-Id: I38cec4afb860f17e9f8be7b67544e58b330f8fff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-02-16 00:18:32 +01:00
..
animation tst_qpauseanimation: Fix condition in QEXPECT_FAIL. 2014-01-30 22:10:22 +01:00
codecs Fix compilation after b0afad8f0b 2014-02-07 04:47:12 +01:00
global Merge remote-tracking branch 'origin/stable' into dev 2014-02-12 16:28:07 +01:00
io Add const overload for QLoggingCategory::operator()() 2014-02-15 21:57:43 +01:00
itemmodels Merge remote-tracking branch 'origin/stable' into dev 2014-02-07 13:07:25 +01:00
json Added constructor to QJsonValue for const char * 2014-01-16 21:49:26 +01:00
kernel tst_qsignalblocker: simplify test 2014-02-16 00:18:32 +01:00
mimetypes test: Don't build qmimedatabase-cache for QNX 2014-01-16 16:11:04 +01:00
plugin qcompilerdetection.h: add Q_COMPILER_UNIFORM_INIT 2013-11-15 06:30:53 +01:00
statemachine don't erroneously claim that gui support is needed 2013-10-16 17:10:15 +02:00
thread Replace the type-based QAtomicIntegerTraits with a size-based one 2014-01-30 18:06:27 +01:00
tools Add qHash() overloads for floating-point types 2014-02-16 00:18:32 +01:00
xml Check for network module when building according auto tests 2013-02-19 19:20:53 +01:00
corelib.pro iOS: Enable building of basic tests 2014-01-22 12:35:17 +01:00