On segunda-feira, 20 de fevereiro de 2012 09.33.27, andre.poen...@nokia.com
wrote:
> This needlessly removes existing functionality. We promised to try
> hard to not do that in the Qt 4-> Qt 5 transition. Removing the typedef
> is essentially a showstopper for people currently relying on double.
>
> Leaving the 'qreal' typedef (to float...) hurts less as it can be fixed by
> recompilation,  and is not does not affect code size and performance
> compared to a global search&replace.

How about we leave it defined to double in all platforms and deprecate it?


$ gcc -xc++ -O3 -o /dev/null - <<EOF
__attribute__((deprecated)) typedef double qreal;
int main() { double x = 1.0; qreal y = x; return 0; }
EOF
<stdin>: In function ‘int main()’:
<stdin>:2:36: warning: ‘qreal’ is deprecated (declared at <stdin>:1) [-
Wdeprecated-declarations]

And then proceed to use float where we need float?

--
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

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to