summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2013-02-15 14:44:18 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-20 08:38:39 +0100
commit79498af6e44d8c44b681c1a857523d633d3aea3a (patch)
tree3425c7602e1e338f99f5ea25bcec4bc6d51b2006 /src/plugins
parentdd30f3e65b7fb56f64c992dc5f341a9c5dba6c07 (diff)
Fix the default handling of cursor shape when there is no standard one
When the cursor specified is a bitmap one we cannot cache it based on the shape as the pixmap set on the cursor may be different. Therefore we should always create a new cursor in this instance. Change-Id: I2c201590ff632490d76c1b423908ae32aa584eb6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/cocoa/qcocoacursor.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoacursor.mm b/src/plugins/platforms/cocoa/qcocoacursor.mm
index 9b30351d70..b97531545f 100644
--- a/src/plugins/platforms/cocoa/qcocoacursor.mm
+++ b/src/plugins/platforms/cocoa/qcocoacursor.mm
@@ -96,10 +96,15 @@ void QCocoaCursor::changeCursor(QCursor *cursor, QWindow *window)
break;
case Qt::DragLinkCursor:
[[NSCursor dragLinkCursor] set];
+ break;
default : {
// No suitable OS cursor exist, use cursors provided
// by Qt for the rest. Check for a cached cursor:
NSCursor *cocoaCursor = m_cursors.value(cursor->shape());
+ if (cocoaCursor && cursor->shape() == Qt::BitmapCursor) {
+ [cocoaCursor release];
+ cocoaCursor = 0;
+ }
if (cocoaCursor == 0) {
cocoaCursor = createCursorData(cursor);
if (cocoaCursor == 0) {