summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsscene
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-06-11 09:33:54 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-06-11 09:34:05 (GMT)
commitc6f2229bcecbbea2d1f3df149d1a397cd26b43c7 (patch)
treebb14b976cddccdb196a68bed6f9b94d10273f857 /tests/auto/qgraphicsscene
parentbc3abd32ed1c5a872d7a7817c1af0a13f442d536 (diff)
parent0989cbe2b164560eef14334a540fcbcb2e2ec8cb (diff)
downloadQt-c6f2229bcecbbea2d1f3df149d1a397cd26b43c7.zip
Qt-c6f2229bcecbbea2d1f3df149d1a397cd26b43c7.tar.gz
Qt-c6f2229bcecbbea2d1f3df149d1a397cd26b43c7.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into qt-main/qgraphicssceneindex
Painfull merge due to recent changes in QGV framework. Conflicts: src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicsscene.h src/gui/graphicsview/qgraphicsscene_p.h src/gui/graphicsview/qgraphicsview.cpp
Diffstat (limited to 'tests/auto/qgraphicsscene')
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index dd997c7..4d786c7 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -274,7 +274,9 @@ void tst_QGraphicsScene::sceneRect()
QCOMPARE(scene.sceneRect(), QRectF());
QGraphicsItem *item = scene.addRect(QRectF(0, 0, 10, 10));
+ qApp->processEvents();
item->setPos(-5, -5);
+ qApp->processEvents();
QCOMPARE(scene.itemAt(0, 0), item);
QCOMPARE(scene.itemAt(10, 10), (QGraphicsItem *)0);
@@ -1319,8 +1321,9 @@ void tst_QGraphicsScene::removeItem()
scene.removeItem(hoverItem);
hoverItem->setAcceptsHoverEvents(false);
scene.addItem(hoverItem);
- qApp->processEvents(); // update
- qApp->processEvents(); // draw
+ qApp->processEvents(); // <- delayed update is called
+ qApp->processEvents(); // <- scene schedules pending update
+ qApp->processEvents(); // <- pending update is sent to view
QVERIFY(!hoverItem->isHovered);
}
@@ -2714,6 +2717,7 @@ void tst_QGraphicsScene::update()
QGraphicsRectItem *rect = new QGraphicsRectItem(0, 0, 100, 100);
scene.addItem(rect);
+ qApp->processEvents();
rect->setPos(-100, -100);
// This function forces indexing