QColorDialog: wrap setCursor calls in #ifndef QT_NO_CURSOR

QColorDialog mistakenly assumes setCursor will work everywhere.

Change-Id: Ia5e513f6825c931ce42276ea2eb581e049c5b41a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Andrew Knight 2013-08-30 13:15:00 +03:00 committed by The Qt Project
parent 5ec1c7727b
commit 5bf16380d2

View File

@ -1527,7 +1527,9 @@ void QColorDialogPrivate::_q_pickScreenColor()
* the cursor, and therefore I have to change it manually.
*/
q->grabMouse();
#ifndef QT_NO_CURSOR
q->setCursor(Qt::CrossCursor);
#endif
q->grabKeyboard();
/* With setMouseTracking(true) the desired color can be more precisedly picked up,
* and continuously pushing the mouse button is not necessary.
@ -1551,7 +1553,9 @@ void QColorDialogPrivate::releaseColorPicking()
screenColorPicking = false;
q->releaseMouse();
q->releaseKeyboard();
#ifndef QT_NO_CURSOR
q->setCursor(Qt::ArrowCursor);
#endif
q->setMouseTracking(false);
lblScreenColorInfo->setText(QLatin1String("\n"));
addCusBt->setDisabled(false);