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>
This commit is contained in:
parent
6c6fde809a
commit
c70750f536
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user