summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsscene
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-11-05 17:35:28 +0100
committerOlivier Goffart <olivier.goffart@nokia.com>2010-11-05 17:35:28 +0100
commit58bac5551cbeed83a99e257226bb7b40d363bab9 (patch)
tree4c4f47fc20f53a29e4d5dcfa3e59b8e7d523dee3 /tests/auto/qgraphicsscene
parentebecf192abe56c405409343acc2f97eaf9124fc3 (diff)
parent60b09b8915e2095b221eb0a16a76d49e5bb10391 (diff)
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: mkspecs/features/symbian/symbian_building.prf src/network/access/qhttpnetworkconnectionchannel.cpp
Diffstat (limited to 'tests/auto/qgraphicsscene')
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index 09cf4e2d53..6a2f8490c9 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -2694,12 +2694,14 @@ void tst_QGraphicsScene::render()
QPixmap pix(30, 30);
pix.fill(Qt::blue);
- QGraphicsScene scene;
+ QGraphicsView view;
+ QGraphicsScene scene(&view);
scene.addEllipse(QRectF(-10, -10, 20, 20), QPen(Qt::black), QBrush(Qt::white));
scene.addEllipse(QRectF(-2, -7, 4, 4), QPen(Qt::black), QBrush(Qt::yellow))->setZValue(1);
QGraphicsPixmapItem *item = scene.addPixmap(pix);
item->setZValue(2);
item->setOffset(QPointF(3, 3));
+ view.show();
scene.setSceneRect(scene.itemsBoundingRect());
@@ -2820,6 +2822,8 @@ void tst_QGraphicsScene::contextMenuEvent()
QGraphicsView view(&scene);
view.show();
+ QTest::qWaitForWindowShown(&view);
+ view.activateWindow();
#ifdef Q_WS_X11
qt_x11_wait_for_window_manager(&view);
#endif
@@ -2851,12 +2855,14 @@ void tst_QGraphicsScene::contextMenuEvent_ItemIgnoresTransformations()
item->setFlag(QGraphicsItem::ItemIgnoresTransformations);
scene.addItem(item);
- QGraphicsView view(&scene);
+ QWidget topLevel;
+ QGraphicsView view(&scene, &topLevel);
view.resize(200, 200);
- view.show();
+ topLevel.show();
#ifdef Q_WS_X11
qt_x11_wait_for_window_manager(&view);
#endif
+ QTest::qWaitForWindowShown(&topLevel);
{
QPoint pos(50, 50);