[Development] Changing qreal to a float

jan-arve.saether at nokia.com jan-arve.saether at nokia.com
Tue Feb 21 16:40:16 CET 2012

Sorry for top-posting from my N9...

I was thinking the same, but I'm afraid we can't change it, since it would cause too many subtle bugs.

The best thing I can think is to deprecate it, and add a QRectS or QRectI, but I'm not utterly convinced...


21.02.12 15:31 skrev ext Andreas Aardal Hanssen:

2012/2/21 Thiago Macieira <thiago.macieira at intel.com<mailto:thiago.macieira at intel.com>>
On terça-feira, 21 de fevereiro de 2012 09.59.49<tel:2012%2009.59.49>, Marc Mutz wrote:
> sure I'd like that), then keeping QRect and using QRectI = QBasicRect<int>
> could do the trick.
QRect must have the same semantics as it has today. Whether we want to add a
*second* rectangle class with slightly different semantics, I'll leave up to
the implementor.

QRect's silly semantics are one huge reason why it can make sense to obsolete it and its friends, and make new QRectangle classes that all behave the same.

I've run into numerous issues that are due to the fact that some rectangle variable's right() value is different depending on whether it's QRect or QRectF. QRect was kept this way for compatibility with Qt 3. Qt 5 should have no more such crap.

There never was any QPoly (gon), QEll (ipse), why should there be a QRect. M'just sayin'.

(sorry if this arrives twice to the list btw)

Andreas Aardal Hanssen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120221/24b89d83/attachment.html>

More information about the Development mailing list