summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qcolordialog.cpp
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2013-08-30 13:15:00 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-03 14:31:06 +0200
commit5bf16380d27280c519e856665b8b50680eb16053 (patch)
tree51d6f8b284b3ce301ece329f0b0d95373dec1d4b /src/widgets/dialogs/qcolordialog.cpp
parent5ec1c7727b887500f4c93875804f982355c230da (diff)
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>
Diffstat (limited to 'src/widgets/dialogs/qcolordialog.cpp')
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp4
1 files changed, 4 insertions, 0 deletions
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);