From c9d26aa99c8f2279b54e6bb7ea68f30608e7e02a Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 28 Jan 2011 09:19:58 +0100 Subject: 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. --- src/testlib/qtestmouse.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/testlib') diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h index 35752b00b9..5abb019786 100644 --- a/src/testlib/qtestmouse.h +++ b/src/testlib/qtestmouse.h @@ -107,7 +107,11 @@ namespace QTest break; case MouseMove: QCursor::setPos(widget->mapToGlobal(pos)); +#ifdef QT_MAC_USE_COCOA + QTest::qWait(20); +#else qApp->processEvents(); +#endif return; default: QTEST_ASSERT(false); -- cgit v1.2.1