[Development] Should QVariant be doing fuzzy comparisons on doubles?

Thiago Macieira thiago.macieira at intel.com
Mon Sep 19 18:20:48 CEST 2016

This code was there in Qt 5.0, so I kept it when I refactored the numeric 
comparisons. Now, dealing with QTBUG-56073, I'm wondering if it should be 
there in the first place.

Should we do fuzzy comparisns in QVariant?

Note that the fuzzy comparisons are always performed in qreal precision 
(whichever that may be), regardless of whether the original number is float, 
double or an integer.
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Development mailing list