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 <andy.shaw@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
bb10
Janne Anttila 2012-08-08 15:34:06 +03:00 committed by Qt by Nokia
parent 1b54d1e4d5
commit 85bd95cc31
1 changed files with 0 additions and 2 deletions

View File

@ -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<Qt::DropAction> actions;
actions << Qt::MoveAction << Qt::CopyAction << Qt::LinkAction;