Fix override cursor issue with QtQuick2ApplicationViewer.

If the override cursor was set before
QtQuick2ApplicationViewer was shown then the cursor
was the default cursor and not the override cursor.
The new cursor was applied only if the window was
visible and the cursor has been set. Now the cursor
is applied also if override cursor is set.

Change-Id: I88618c719e43b2802e209bef440461c532d19f48
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
Kati Kankaanpaa 2014-04-22 11:39:55 -07:00 committed by The Qt Project
parent 948fa572de
commit aef82ebe15

View File

@ -455,7 +455,7 @@ void QWindow::setVisible(bool visible)
}
#ifndef QT_NO_CURSOR
if (visible && d->hasCursor)
if (visible && (d->hasCursor || QGuiApplication::overrideCursor()))
d->applyCursor();
#endif
d->platformWindow->setVisible(visible);