summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@nokia.com>2010-02-01 17:38:35 (GMT)
committerMarco Bubke <marco.bubke@nokia.com>2010-02-01 18:33:09 (GMT)
commit652be80c25f61aa4fbf28d75ba9971fc709f29c9 (patch)
tree835afbb38bc2a17b2b7fa28a3c34b8b58d9b1369 /src/gui/graphicsview
parentd28d9c1d6e2c54cf41a9cc52f41b0542cb9717aa (diff)
downloadQt-652be80c25f61aa4fbf28d75ba9971fc709f29c9.zip
Qt-652be80c25f61aa4fbf28d75ba9971fc709f29c9.tar.gz
Qt-652be80c25f61aa4fbf28d75ba9971fc709f29c9.tar.bz2
Tests for NaN values in the property x, y, widht and height setters of
QGraphicsItem and QmlGraphicsItem Task-number: BAUHAUS-268 Reviewed-by: Thomas Hartmann
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index c53a893..3d81021 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -3425,6 +3425,9 @@ void QGraphicsItem::setX(qreal x)
if (d_ptr->inDestructor)
return;
+ if (isnan(x))
+ return;
+
d_ptr->setPosHelper(QPointF(x, d_ptr->pos.y()));
}
@@ -3449,6 +3452,9 @@ void QGraphicsItem::setY(qreal y)
if (d_ptr->inDestructor)
return;
+ if (isnan(y))
+ return;
+
d_ptr->setPosHelper(QPointF(d_ptr->pos.x(), y));
}