[Development] Changing qreal to a float

Mark markg85 at gmail.com
Mon Feb 20 18:27:47 CET 2012


2012/2/20 João Abecasis <joao.abecasis at nokia.com>

>
> Boudewijn Rempt wrote:
> > Well, Qt is a library, a platform -- and that means that you cannot
> predict how and when classes and things like qreal will be used, and that
> if something is changed there, it _will_ mean a porting effort, potentially
> a big one. Heck, we haven't even really recovered from the previous porting
> from Qt3 to Qt4!
>
> Hence my suggestion: Drop qreal entirely, don't deprecate it and don't try
> to figure out what it should mean. We realized it was a broken concept and
> it plays against the C++ language we depend on.
>
> What's the porting effort for applications that use and depend on qreal?
>
> Application developers have to decide exactly what qreal was supposed to
> mean for them and typedef it to what's appropriate. It's a one-line change.
> They can patch Qt's qglobal.h if they ship their version of Qt, or they can
> add the typedef in their own code.
>
> Libraries that depend on Qt will have to analyze the issue and make their
> own decision: a) jump to double or float or b) provide their own
> AwesomeReal, if that makes sense in their context.
>
> It's not even a surprise or unexpected outcome if we document the issue or
> make sure a meaningful error is generated upon use of qreal.
>
> The bigger porting effort doesn't come from the disappearance of qreal
> itselft, but from changing Qt itself to not use it as users will no longer
> be able to assume QRectF and whatnot use double on their platform. And no
> one seems to be against that.
>
> Cheers,
>
>
> João
>
> Hi list,

Qt4 was going to have a "qt4support" module right? Why not drop it out of
Qt5 and put it in the Qt4 support module?
That way users know it's deprecated and should not be used but does allow
them to use it if they want.

Just my 5ct.

Regards,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120220/be24f22b/attachment.html>


More information about the Development mailing list