[Development] Proposing reversal of the Math3D qreal->float change

Thiago Macieira thiago.macieira at intel.com
Tue Sep 11 15:08:26 CEST 2012


On terça-feira, 11 de setembro de 2012 12.46.56, marco.bubke at nokia.com wrote:
> But than we would be not have the same behaviour, if qreal is float or
> double. Actually I changed every code in the qml designer explicitly to
> double or float. It would be really nice, if the Qt classes would be has  a
> float and a double implementation. From my perspective qreal is breaking
> the cross plattform promise!

We discussed changing qreal to either of the types and we did not come to a 
conclusion. The best solution would be to provide the complex types in both 
formats and let the API decide which one is more suitable. For example, 
QtLocation would prefer to have double precision, but the OpenGL-related 
functionality might be satisfied with single precision.

But doing that was source-incompatible.

So we didn't change qreal. We only changed the Math3D classes, apparently 
because they're used with OpenGL only.

The only problem is that no one had ever tested them with single precision 
while qreal is double, or in a platform where unit tests are run.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden




More information about the Development mailing list