summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsview
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-08-18 15:27:17 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-08-18 16:51:10 (GMT)
commite08ca6bcaf5fc746fdf8f3e379c17bf0a9daa771 (patch)
treee4aa19205990b9af8bf339190c50c4f6312581c2 /tests/auto/qgraphicsview
parent3f83ef0a8abc5d1365c67337357564a8d478b1c1 (diff)
downloadQt-e08ca6bcaf5fc746fdf8f3e379c17bf0a9daa771.zip
Qt-e08ca6bcaf5fc746fdf8f3e379c17bf0a9daa771.tar.gz
Qt-e08ca6bcaf5fc746fdf8f3e379c17bf0a9daa771.tar.bz2
QGraphicsView test fix
Reviewed-by: Olivier
Diffstat (limited to 'tests/auto/qgraphicsview')
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index c12fb11..2506e70 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -3637,18 +3637,18 @@ void tst_QGraphicsView::task255529_transformationAnchorMouseAndViewportMargins()
VpGraphicsView view(&scene);
view.show();
+#ifdef Q_WS_X11
+ qt_x11_wait_for_window_manager(&view);
+#endif
QPoint mouseViewPos(20, 20);
sendMouseMove(view.viewport(), mouseViewPos);
- QTest::qWait(125);
QPointF mouseScenePos = view.mapToScene(mouseViewPos);
- view.setTransform(QTransform().scale(5, 5));
- QTest::qWait(125);
- view.setTransform(QTransform().rotate(5, Qt::ZAxis), true);
- QTest::qWait(125);
+ view.setTransform(QTransform().scale(5, 5).rotate(5, Qt::ZAxis), true);
QPointF newMouseScenePos = view.mapToScene(mouseViewPos);
- qreal slack = 3;
+
+ qreal slack = 1;
QVERIFY(qAbs(newMouseScenePos.x() - mouseScenePos.x()) < slack);
QVERIFY(qAbs(newMouseScenePos.y() - mouseScenePos.y()) < slack);
}