summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsscene
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-06-03 16:23:20 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-06-03 16:23:20 (GMT)
commitffd6bc0351c96c8a3828bd7376f2b6bda317cd71 (patch)
tree4d2879a9f3525eb0c88df54d21dba71b4748586f /tests/auto/qgraphicsscene
parent427c4d6b0a8b3004c86facd382de33c171c0458b (diff)
downloadQt-ffd6bc0351c96c8a3828bd7376f2b6bda317cd71.zip
Qt-ffd6bc0351c96c8a3828bd7376f2b6bda317cd71.tar.gz
Qt-ffd6bc0351c96c8a3828bd7376f2b6bda317cd71.tar.bz2
Remove the sorting cache from the QGraphicsScene and move it to the BSP.
Now the QGraphicsScene has no idea how works the index. So we can improve it separatly, add new ones and benchmarks existing ones.
Diffstat (limited to 'tests/auto/qgraphicsscene')
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index eb117ab..dd997c7 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -379,8 +379,7 @@ void tst_QGraphicsScene::items()
for (int x = minX; x < maxX; x += 100)
items << scene.addRect(QRectF(0, 0, 10, 10));
}
-
- QCOMPARE(scene.items(), items);
+ QCOMPARE(scene.items().size(), items.size());
scene.itemAt(0, 0); // trigger indexing
scene.removeItem(items.at(5));
@@ -397,7 +396,7 @@ void tst_QGraphicsScene::items()
QVERIFY(!l2->sceneBoundingRect().intersects(l1->sceneBoundingRect()));
QList<QGraphicsItem *> items;
items<<l1<<l2;
- QCOMPARE(scene.items(), items);
+ QCOMPARE(scene.items().size(), items.size());
QVERIFY(scene.items(-1, -1, 2, 2).contains(l1));
QVERIFY(scene.items(-1, -1, 2, 2).contains(l2));
}