summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/dnd/qsimpledrag.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/platformsupport/dnd/qsimpledrag.cpp b/src/platformsupport/dnd/qsimpledrag.cpp
index d8ef17ede3..18e6b97e3c 100644
--- a/src/platformsupport/dnd/qsimpledrag.cpp
+++ b/src/platformsupport/dnd/qsimpledrag.cpp
@@ -253,8 +253,19 @@ void QBasicDrag::updateCursor(Qt::DropAction action)
}
QCursor *cursor = qApp->overrideCursor();
- if (cursor && cursorShape != cursor->shape()) {
- qApp->changeOverrideCursor(QCursor(cursorShape));
+ QPixmap pixmap = m_drag->dragCursor(action);
+ if (!cursor) {
+ qApp->changeOverrideCursor((pixmap.isNull()) ? QCursor(cursorShape) : QCursor(pixmap));
+ } else {
+ if (!pixmap.isNull()) {
+ if ((cursor->pixmap().cacheKey() != pixmap.cacheKey())) {
+ qApp->changeOverrideCursor(QCursor(pixmap));
+ }
+ } else {
+ if (cursorShape != cursor->shape()) {
+ qApp->changeOverrideCursor(QCursor(cursorShape));
+ }
+ }
}
updateAction(action);
}