summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-06-17 09:25:36 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-06-17 09:25:36 (GMT)
commitd72727cb7530da54b59c51effa97263512e9238c (patch)
treecef94591e9751efa8d7c8f5de1100c3fc6fd7064
parent8dee7b0c5be293f4b8ebafcae6baa052ca92f1d0 (diff)
downloadQt-d72727cb7530da54b59c51effa97263512e9238c.zip
Qt-d72727cb7530da54b59c51effa97263512e9238c.tar.gz
Qt-d72727cb7530da54b59c51effa97263512e9238c.tar.bz2
Fix broken auto-test for the index.
Since now items() doesn't use the index then the growingboundingrect is not updated if you call right after a delete. It's because the timer is not yet fired (even the processEvent) so you call add, move, remove which will trigger only one update index so the growingboundingrect will never change.
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index 4d786c7..17d290b 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -2726,8 +2726,8 @@ void tst_QGraphicsScene::update()
qRegisterMetaType<QList<QRectF> >("QList<QRectF>");
QSignalSpy spy(&scene, SIGNAL(changed(QList<QRectF>)));
- // When deleted, the item will lazy-remove itself
- delete rect;
+ // We update the scene.
+ scene.update();
// This function forces a purge, which will post an update signal
scene.itemAt(0, 0);