From c70750f5363999640cc99278ccf90679fb27c84d Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 29 Nov 2013 10:06:20 +0100 Subject: Stabilize tst_QGraphicsItem The cursor() test was missing a QTest::moveMouse() before sending of the mouse event (as all the following subtests do). When run on a desktop with the panel on the left side of the screen, the mouse pointer would land over the left item instead of in between them, as assumed by the subtest, and the following QCOMPARE failed. Change-Id: Ib74fdf0cfbfbc8ecb79a906610a2da5cb50c89d0 Reviewed-by: Friedemann Kleint --- tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp index 6c26ddb293..fc1d0e34cb 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp @@ -4221,6 +4221,7 @@ void tst_QGraphicsItem::cursor() QCursor cursor = view.viewport()->cursor(); { + QTest::mouseMove(view.viewport(), QPoint(100, 50)); QMouseEvent event(QEvent::MouseMove, QPoint(100, 50), Qt::NoButton, 0, 0); QApplication::sendEvent(view.viewport(), &event); } -- cgit v1.2.3