diff options
author | Mitch Curtis <mitch.curtis@nokia.com> | 2012-08-01 16:02:10 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-22 04:04:57 +0200 |
commit | 09dd19df5c4b708960e5aade568eb15d996ef200 (patch) | |
tree | 3a997704b1324dfb45f69d892128399affcac242 /tests/auto/shared | |
parent | 7f469ef4cc614925d7a4fdb3380ff5470e25b03b (diff) |
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: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'tests/auto/shared')
0 files changed, 0 insertions, 0 deletions