diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2013-11-29 10:06:20 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-03 11:42:13 +0100 |
commit | c70750f5363999640cc99278ccf90679fb27c84d (patch) | |
tree | 4352e1d8a978762908d176f9dd0a293c2f719825 | |
parent | 6c6fde809a5f380b2a1bab99e45c4c085fbcfb9d (diff) |
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 <Friedemann.Kleint@digia.com>
-rw-r--r-- | tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |