summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-02-08 11:25:10 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-02-08 11:39:19 (GMT)
commit7724c474a941ea3516da6102a16b30ca254afe53 (patch)
tree6e8b751da64bfa25f88b53c732107cbb0d582822 /tests/auto
parenta8d09369fea1574b24309d7b7b2bb373021bf387 (diff)
downloadQt-7724c474a941ea3516da6102a16b30ca254afe53.zip
Qt-7724c474a941ea3516da6102a16b30ca254afe53.tar.gz
Qt-7724c474a941ea3516da6102a16b30ca254afe53.tar.bz2
QGraphicsItem: Do not crash at exit if there is static QGraphicsItem.
The DataStore could have been destroyed before. Even if having static QGraphicsItem is not really supported, it is better not to crash Task-number: QTBUG-7629 Reviewed-by: bnilsen
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 7b54a3b..7c1b97e 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -90,6 +90,8 @@ Q_DECLARE_METATYPE(QRectF)
#define COMPARE_REGIONS QTRY_COMPARE
#endif
+static QGraphicsRectItem staticItem; //QTBUG-7629, we should not crash at exit.
+
static void sendMousePress(QGraphicsScene *scene, const QPointF &point, Qt::MouseButton button = Qt::LeftButton)
{
QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);