Remove disabled code from qgraphicssceneindex test
The removed code used to test API that was removed in the graphicsview refactor that was done for Qt 4.5.1. Change-Id: I3b312b9e51114e24c6ef1191353c35688b229d99 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
parent
a6e6296ce3
commit
a1c3bd7547
@ -56,8 +56,6 @@ public slots:
|
|||||||
void initTestCase();
|
void initTestCase();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void customIndex_data();
|
|
||||||
void customIndex();
|
|
||||||
void scatteredItems_data();
|
void scatteredItems_data();
|
||||||
void scatteredItems();
|
void scatteredItems();
|
||||||
void overlappedItems_data();
|
void overlappedItems_data();
|
||||||
@ -99,25 +97,6 @@ QGraphicsSceneIndex *tst_QGraphicsSceneIndex::createIndex(const QString &indexMe
|
|||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QGraphicsSceneIndex::customIndex_data()
|
|
||||||
{
|
|
||||||
common_data();
|
|
||||||
}
|
|
||||||
|
|
||||||
void tst_QGraphicsSceneIndex::customIndex()
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
QFETCH(QString, indexMethod);
|
|
||||||
QGraphicsSceneIndex *index = createIndex(indexMethod);
|
|
||||||
|
|
||||||
QGraphicsScene scene;
|
|
||||||
scene.setSceneIndex(index);
|
|
||||||
|
|
||||||
scene.addRect(0, 0, 30, 40);
|
|
||||||
QCOMPARE(scene.items(QRectF(0, 0, 10, 10)).count(), 1);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void tst_QGraphicsSceneIndex::scatteredItems_data()
|
void tst_QGraphicsSceneIndex::scatteredItems_data()
|
||||||
{
|
{
|
||||||
common_data();
|
common_data();
|
||||||
@ -128,12 +107,7 @@ void tst_QGraphicsSceneIndex::scatteredItems()
|
|||||||
QFETCH(QString, indexMethod);
|
QFETCH(QString, indexMethod);
|
||||||
|
|
||||||
QGraphicsScene scene;
|
QGraphicsScene scene;
|
||||||
#if 1
|
|
||||||
scene.setItemIndexMethod(indexMethod == "linear" ? QGraphicsScene::NoIndex : QGraphicsScene::BspTreeIndex);
|
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 i = 0; i < 10; ++i)
|
||||||
scene.addRect(i*50, i*50, 40, 35);
|
scene.addRect(i*50, i*50, 40, 35);
|
||||||
@ -157,12 +131,7 @@ void tst_QGraphicsSceneIndex::overlappedItems()
|
|||||||
QFETCH(QString, indexMethod);
|
QFETCH(QString, indexMethod);
|
||||||
|
|
||||||
QGraphicsScene scene;
|
QGraphicsScene scene;
|
||||||
#if 1
|
|
||||||
scene.setItemIndexMethod(indexMethod == "linear" ? QGraphicsScene::NoIndex : QGraphicsScene::BspTreeIndex);
|
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 i = 0; i < 10; ++i)
|
||||||
for (int j = 0; j < 10; ++j)
|
for (int j = 0; j < 10; ++j)
|
||||||
@ -191,12 +160,7 @@ void tst_QGraphicsSceneIndex::movingItems()
|
|||||||
QFETCH(QString, indexMethod);
|
QFETCH(QString, indexMethod);
|
||||||
|
|
||||||
QGraphicsScene scene;
|
QGraphicsScene scene;
|
||||||
#if 1
|
|
||||||
scene.setItemIndexMethod(indexMethod == "linear" ? QGraphicsScene::NoIndex : QGraphicsScene::BspTreeIndex);
|
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 i = 0; i < 10; ++i)
|
||||||
scene.addRect(i*50, i*50, 40, 35);
|
scene.addRect(i*50, i*50, 40, 35);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user