From 5bf16380d27280c519e856665b8b50680eb16053 Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Fri, 30 Aug 2013 13:15:00 +0300 Subject: [PATCH] QColorDialog: wrap setCursor calls in #ifndef QT_NO_CURSOR QColorDialog mistakenly assumes setCursor will work everywhere. Change-Id: Ia5e513f6825c931ce42276ea2eb581e049c5b41a Reviewed-by: Friedemann Kleint --- src/widgets/dialogs/qcolordialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index 5da41aa0a5..82f70f323b 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -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);