summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/qgraphicsscene
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-08-24 09:07:43 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-08-24 09:09:06 (GMT)
commitaceeaa1dcbce8b1fbd869eb64a1f59b928d59e4e (patch)
tree329713a9ac3250d35b4813219c82fdd1bf898afd /tests/benchmarks/qgraphicsscene
parentd2b5d9010ade3050fc2e2960a694c42e354c381b (diff)
downloadQt-aceeaa1dcbce8b1fbd869eb64a1f59b928d59e4e.zip
Qt-aceeaa1dcbce8b1fbd869eb64a1f59b928d59e4e.tar.gz
Qt-aceeaa1dcbce8b1fbd869eb64a1f59b928d59e4e.tar.bz2
Speedup the qgraphicsscene benchmark
let QGraphicsScene::_q_polishItems be called so ~QGraphicsItem doesn't spend all his time cleaning the unpolished list
Diffstat (limited to 'tests/benchmarks/qgraphicsscene')
-rw-r--r--tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp
index 7a5caa4..172f7d4 100644
--- a/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/benchmarks/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -166,6 +166,8 @@ void tst_QGraphicsScene::addItem()
}
scene.itemAt(0, 0);
}
+ //let QGraphicsScene::_q_polishItems be called so ~QGraphicsItem doesn't spend all his time cleaning the unpolished list
+ qApp->processEvents();
}
void tst_QGraphicsScene::itemAt_data()
@@ -220,6 +222,9 @@ void tst_QGraphicsScene::itemAt()
QBENCHMARK {
scene.itemAt(0, 0);
}
+
+ //let QGraphicsScene::_q_polishItems be called so ~QGraphicsItem doesn't spend all his time cleaning the unpolished list
+ qApp->processEvents();
}
QTEST_MAIN(tst_QGraphicsScene)