On Monday 19 September 2016 18:20:48 Thiago Macieira wrote:
> Should we do fuzzy comparisns in QVariant?

If you talk about op==, then using fuzzy compare is a definite no-no, because 
it makes it impossible to define a hash function.

Fuzzy comparision should be performed with a named function, qFuzzyCompare, 
and _only_ with that function.

We need to fix other classes for Qt 6, too (e.g. Q(Size|Point|Line)F.

That said, a qFuzzyCompare(QVariant, QVariant) would probably be useful, but 
requires extensive extra work, like hashing a QVariant, too.


Marc Mutz <marc.m...@kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - Qt, C++ and OpenGL Experts
Development mailing list

Reply via email to