diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-20 18:45:43 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-20 18:45:43 (GMT) |
commit | d63d0c10c0eeef0d2f93f3d0b197e09399087b00 (patch) | |
tree | 746a1856103d6367f9821a81b7eee25aeb10a7ed /tests/benchmarks | |
parent | 435c87186ff54ebfd481e41e07b9a136fbc87a20 (diff) | |
parent | e90a5e819478b656963de0492a1b234c8863a12b (diff) | |
download | Qt-d63d0c10c0eeef0d2f93f3d0b197e09399087b00.zip Qt-d63d0c10c0eeef0d2f93f3d0b197e09399087b00.tar.gz Qt-d63d0c10c0eeef0d2f93f3d0b197e09399087b00.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into qtscript-jsc-backend
Conflicts:
src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
Diffstat (limited to 'tests/benchmarks')
-rw-r--r-- | tests/benchmarks/qgraphicsitem/tst_qgraphicsitem.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/benchmarks/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/benchmarks/qgraphicsitem/tst_qgraphicsitem.cpp index 923838a..91dd28b 100644 --- a/tests/benchmarks/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/benchmarks/qgraphicsitem/tst_qgraphicsitem.cpp @@ -61,6 +61,7 @@ public slots: private slots: void setParentItem(); void setParentItem_deep(); + void setParentItem_deep_reversed(); void deleteItemWithManyChildren(); void setPos_data(); void setPos(); @@ -113,6 +114,19 @@ void tst_QGraphicsItem::setParentItem_deep() } } +void tst_QGraphicsItem::setParentItem_deep_reversed() +{ + QBENCHMARK { + QGraphicsRectItem *lastRect = new QGraphicsRectItem; + for (int i = 0; i < 100; ++i) { + QGraphicsRectItem *parentRect = new QGraphicsRectItem; + lastRect->setParentItem(parentRect); + lastRect = parentRect; + } + delete lastRect; + } +} + void tst_QGraphicsItem::deleteItemWithManyChildren() { QBENCHMARK { |