summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-09 08:10:23 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-09 08:20:06 (GMT)
commitbbbdf511be4afdb08d2a4d7c365a84adde7ae324 (patch)
treee038b46d7b262d3d3e372e76b10fce7fdbf789eb
parent8437faaadab1d7bf8861e1d6575f4e1bff04b005 (diff)
downloadQt-bbbdf511be4afdb08d2a4d7c365a84adde7ae324.zip
Qt-bbbdf511be4afdb08d2a4d7c365a84adde7ae324.tar.gz
Qt-bbbdf511be4afdb08d2a4d7c365a84adde7ae324.tar.bz2
More inDestructor checks.
Declarative tripped these (crashes). Reviewed-by:Aaron Kennedy
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index a236b14..723e496 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -3349,6 +3349,9 @@ QPointF QGraphicsItem::pos() const
*/
void QGraphicsItem::setX(qreal x)
{
+ if (d_ptr->inDestructor)
+ return;
+
d_ptr->setPosHelper(QPointF(x, d_ptr->pos.y()));
}
@@ -3370,6 +3373,9 @@ void QGraphicsItem::setX(qreal x)
*/
void QGraphicsItem::setY(qreal y)
{
+ if (d_ptr->inDestructor)
+ return;
+
d_ptr->setPosHelper(QPointF(d_ptr->pos.x(), y));
}
@@ -3435,6 +3441,9 @@ void QGraphicsItem::setPos(const QPointF &pos)
if (d_ptr->pos == pos)
return;
+ if (d_ptr->inDestructor)
+ return;
+
// Update and repositition.
if (!(d_ptr->flags & ItemSendsGeometryChanges)) {
d_ptr->setPosHelper(pos);