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