From 85bd95cc318c0ad64aee892e2955b84f196a5d71 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Wed, 8 Aug 2012 15:34:06 +0300 Subject: [PATCH] Fix drag curor visibility on Windows. QDrag has an API to set both pixmap (QDrag::setPixmap) and drag cursor (QDrag::setDragCursor): http://qt-project.org/doc/qt-5.0/qdrag.html. We cannot return from createCursors if there is no pixmap, but we need to go through also dragCursor and use those if one is set. Change-Id: If2b2139ad193a4ab5b25c65400c595dc7c33de2c Reviewed-by: Andy Shaw Reviewed-by: Miikka Heikkinen Reviewed-by: Friedemann Kleint --- src/plugins/platforms/windows/qwindowsdrag.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsdrag.cpp b/src/plugins/platforms/windows/qwindowsdrag.cpp index 8ff67f53fb..94addfc1e3 100644 --- a/src/plugins/platforms/windows/qwindowsdrag.cpp +++ b/src/plugins/platforms/windows/qwindowsdrag.cpp @@ -336,8 +336,6 @@ void QWindowsOleDropSource::createCursors() const QDrag *drag = m_drag->currentDrag(); const QPixmap pixmap = drag->pixmap(); const bool hasPixmap = !pixmap.isNull(); - if (!hasPixmap) - return; QList actions; actions << Qt::MoveAction << Qt::CopyAction << Qt::LinkAction;