Process initial expose events immediately.

Required to prevent qmlscene flicker on startup.

Also brings back that qWait() in tst_QGL::graphicsViewClipping()
that seems necessary after all.

Amended-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Change-Id: I14ba6e18ac98e5df1ce8ecbc263b30176b67d111
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
Morten Johan Sørvig 2013-04-22 13:11:29 +02:00 committed by The Qt Project
parent b2cce40b30
commit 5d07a4d944
2 changed files with 5 additions and 0 deletions

View File

@ -320,6 +320,7 @@ void QCocoaWindow::setVisible(bool visible)
// - QNSViews for child windows are initialy not hidden and won't get the
// viewDidUnhide message.
exposeWindow();
QWindowSystemInterface::flushWindowSystemEvents();
if (m_nsWindow) {
// setWindowState might have been called while the window was hidden and

View File

@ -875,6 +875,10 @@ void tst_QGL::graphicsViewClipping()
scene.setSceneRect(view.viewport()->rect());
QVERIFY(QTest::qWaitForWindowExposed(&view));
#ifdef Q_OS_MAC
// The black rectangle jumps from the center to the upper left for some reason.
QTest::qWait(100);
#endif
QTRY_VERIFY(widget->painted);