summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-04 15:31:47 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-09 07:34:12 (GMT)
commitad92e095ea34dda9d099fae30340a8fbb4c5380a (patch)
treef245499bda45b91cf86fbbbe0f1b6d75918c0d75 /tests
parent98f197d1a11c3dd13959967534b1dba7eea479ea (diff)
downloadQt-ad92e095ea34dda9d099fae30340a8fbb4c5380a.zip
Qt-ad92e095ea34dda9d099fae30340a8fbb4c5380a.tar.gz
Qt-ad92e095ea34dda9d099fae30340a8fbb4c5380a.tar.bz2
Compatibility fix for QGraphicsScene::sceneRectChanged()/sceneRect().
We have to keep the growingItemsBoundingRect up-to-date if there's no scene rect. The only difference now is that sceneRectChanged will not be emitted before entering the event-loop, but the documentation only states it'll be emitted when the scene rect changes, so we consider it harmless. Makes tst_QGraphicsView::sceneRect_growing and tst_QGrahicsScene::sceneRect happy. Reviewed-by: Andreas
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index 23d7a94..9f93ae0 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -274,7 +274,9 @@ void tst_QGraphicsScene::sceneRect()
QCOMPARE(scene.sceneRect(), QRectF());
QGraphicsItem *item = scene.addRect(QRectF(0, 0, 10, 10));
+ qApp->processEvents();
item->setPos(-5, -5);
+ qApp->processEvents();
QCOMPARE(scene.itemAt(0, 0), item);
QCOMPARE(scene.itemAt(10, 10), (QGraphicsItem *)0);