summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicssceneindex
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-18 13:02:05 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-18 13:02:05 (GMT)
commit378b5b603bd269b631bbe108268a683adde11828 (patch)
tree78d2c51d027798e7ab7a8f35404c39cbe7d0079c /tests/auto/qgraphicssceneindex
parent734cc7dd63147f80cd4794351b9124f8d6eb88fe (diff)
downloadQt-378b5b603bd269b631bbe108268a683adde11828.zip
Qt-378b5b603bd269b631bbe108268a683adde11828.tar.gz
Qt-378b5b603bd269b631bbe108268a683adde11828.tar.bz2
Make the autotests compile again.
Reviewed-by: Alexis
Diffstat (limited to 'tests/auto/qgraphicssceneindex')
-rw-r--r--tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp b/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
index 6b352ab..d10f86d 100644
--- a/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
+++ b/tests/auto/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
@@ -42,11 +42,10 @@
#include <QtTest/QtTest>
#include <QtGui/qgraphicsscene.h>
-#include <QtGui/qgraphicssceneindex.h>
#include <private/qgraphicsscenebsptreeindex_p.h>
+#include <private/qgraphicssceneindex_p.h>
#include <private/qgraphicsscenelinearindex_p.h>
-
//TESTED_CLASS=
//TESTED_FILES=
@@ -118,6 +117,7 @@ void tst_QGraphicsSceneIndex::customIndex_data()
void tst_QGraphicsSceneIndex::customIndex()
{
+#if 0
QFETCH(QString, indexMethod);
QGraphicsSceneIndex *index = createIndex(indexMethod);
@@ -126,6 +126,7 @@ void tst_QGraphicsSceneIndex::customIndex()
scene.addRect(0, 0, 30, 40);
QCOMPARE(scene.items(QRectF(0, 0, 10, 10)).count(), 1);
+#endif
}
void tst_QGraphicsSceneIndex::scatteredItems_data()
@@ -136,10 +137,14 @@ void tst_QGraphicsSceneIndex::scatteredItems_data()
void tst_QGraphicsSceneIndex::scatteredItems()
{
QFETCH(QString, indexMethod);
- QGraphicsSceneIndex *index = createIndex(indexMethod);
QGraphicsScene scene;
+#if 1
+ scene.setItemIndexMethod(indexMethod == "linear" ? QGraphicsScene::NoIndex : QGraphicsScene::BspTreeIndex);
+#else
+ QGraphicsSceneIndex *index = createIndex(indexMethod);
scene.setSceneIndex(index);
+#endif
for (int i = 0; i < 10; ++i)
scene.addRect(i*50, i*50, 40, 35);
@@ -161,10 +166,14 @@ void tst_QGraphicsSceneIndex::overlappedItems_data()
void tst_QGraphicsSceneIndex::overlappedItems()
{
QFETCH(QString, indexMethod);
- QGraphicsSceneIndex *index = createIndex(indexMethod);
QGraphicsScene scene;
+#if 1
+ scene.setItemIndexMethod(indexMethod == "linear" ? QGraphicsScene::NoIndex : QGraphicsScene::BspTreeIndex);
+#else
+ QGraphicsSceneIndex *index = createIndex(indexMethod);
scene.setSceneIndex(index);
+#endif
for (int i = 0; i < 10; ++i)
for (int j = 0; j < 10; ++j)
@@ -191,10 +200,14 @@ void tst_QGraphicsSceneIndex::movingItems_data()
void tst_QGraphicsSceneIndex::movingItems()
{
QFETCH(QString, indexMethod);
- QGraphicsSceneIndex *index = createIndex(indexMethod);
QGraphicsScene scene;
+#if 1
+ scene.setItemIndexMethod(indexMethod == "linear" ? QGraphicsScene::NoIndex : QGraphicsScene::BspTreeIndex);
+#else
+ QGraphicsSceneIndex *index = createIndex(indexMethod);
scene.setSceneIndex(index);
+#endif
for (int i = 0; i < 10; ++i)
scene.addRect(i*50, i*50, 40, 35);