Commit 09dd19df authored by Mitch Curtis's avatar Mitch Curtis Committed by Qt by Nokia
Browse files

Do not consider sign in qIsNull.


The current implementation of qIsNull only returns true if the value is
positive zero. This behaviour is not useful for use cases like
QPointF::isNull, where QPointF(-0, -0).isNull() will return false.
There doesn't seem to be a reason why the function exhibits this
behaviour (-0.0 is not accounted for in the unit tests), and for the
case of QSizeF::scale it causes a bug: qIsNull is used to check for
division by 0.0 before it proceeds, which fails in the case of -0.0.

Task-number: QTBUG-7303
Change-Id: I767e5280bd26614e8e78ae62b274eb9bc4ade385
Reviewed-by: default avatarLars Knoll <lars.knoll@nokia.com>
Reviewed-by: default avatarGunnar Sletta <gunnar.sletta@nokia.com>
parent 7f469ef4
Showing with 71 additions and 4 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment