From 8eab45ef460cc6614094ec287dda73febdf3e720 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 17 Jan 2017 15:30:11 +0100 Subject: Fix conversion from blink::WebDragOperation to Qt::DropAction blink::WebDragOperation is a bit field, even if it is not used in its blink::WebDragOperationsMask incarnation. In particular, WebDragOperationGeneric can be set in addition to other operations. This fixes situations where UpdateDragCursor is called with multiple bits set in its WebDragOperationArgument and the drag action will be spuriously ignored. Also directly pass the WebDragOperation we get from UpdateDragCursor to chromium's API without converting to QDropAction and then converting it back. Task-number: QTBUG-58037 Change-Id: I5c85699de534771f84db69abf7b98e779872a0f7 Reviewed-by: Allan Sandfeld Jensen --- src/core/web_contents_adapter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/web_contents_adapter.h') diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h index 3befe6d27..5b2f9a942 100644 --- a/src/core/web_contents_adapter.h +++ b/src/core/web_contents_adapter.h @@ -166,7 +166,7 @@ public: Qt::DropActions allowedActions, const QPixmap &pixmap, const QPoint &offset); void enterDrag(QDragEnterEvent *e, const QPoint &screenPos); Qt::DropAction updateDragPosition(QDragMoveEvent *e, const QPoint &screenPos); - void updateDragAction(Qt::DropAction action); + void updateDragAction(int action); void finishDragUpdate(); void endDragging(const QPoint &clientPos, const QPoint &screenPos); void leaveDrag(); -- cgit v1.2.3