summaryrefslogtreecommitdiff
path: root/tests/auto/qgraphicsview
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2011-01-28 09:19:58 +0100
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2011-01-28 09:19:58 +0100
commitc9d26aa99c8f2279b54e6bb7ea68f30608e7e02a (patch)
treea46304a666207ac14f7c95a3a8df49aed0aa6c94 /tests/auto/qgraphicsview
parent48ca1ffefb4accb9578f1efffbcfff354f0d9976 (diff)
downloadqt4-tools-c9d26aa99c8f2279b54e6bb7ea68f30608e7e02a.tar.gz
Cocoa: fix qgraphicsview autotest
Moving the cursor to the corner of the desktop (0, 0) will typically trigger things to happend in the OS, at least on Mac (spaces, synergy etc). So I changed those tests to move it to (1, 1) instead. The reason to move it to (0, 0) was just to get the mouse away from the window anyway. And second, it takes some time after using QCursor::setPos on Mac before the events from the move actually arrive. And many tests that use this function relies on this. So I introduces a little delay. This alone will fix a couble of tests.
Diffstat (limited to 'tests/auto/qgraphicsview')
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index aaff51e910..f8fc5d0d94 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -2967,7 +2967,7 @@ protected:
void tst_QGraphicsView::task186827_deleteReplayedItem()
{
// make sure the mouse is not over the window, causing spontaneous mouse moves
- QCursor::setPos(0, 0);
+ QCursor::setPos(1, 1);
QGraphicsScene scene;
scene.addRect(0, 0, 50, 50);
@@ -4504,7 +4504,7 @@ void tst_QGraphicsView::hoverLeave()
QVERIFY(item->receivedEnterEvent);
QCOMPARE(item->enterWidget, view.viewport());
- QCursor::setPos(0,0);
+ QCursor::setPos(1,1);
QTest::qWait(200);
QVERIFY(item->receivedLeaveEvent);
QCOMPARE(item->leaveWidget, view.viewport());