Show more appropriate cursor when dragging and enable modifier keys

Authored by rkflx on Jun 25 2018, 9:45 PM.

Description

Show more appropriate cursor when dragging and enable modifier keys

Summary:
984b9737f079 enabled dragging from View mode, but the cursor
stayed the same as when panning. This is because by default
QGraphicsView sets the cursor for moving objects, i.e.
ClosedHandCursor. By setting a default action for QDrag::exec, we
get the DragCopyCursor which better indicates that the image can be
dropped, and which is also used when dragging from the ThumbnailView.

When drag-and-dropping within Dolphin, you can press ,
Ctrl or Ctrl+ to directly move, copy or link a file
instead of showing the popup menu asking for the desired action. By
setting all three actions for the drag object, we can enabled this
behaviour for dragging from Gwenview to Dolphin too, instead of always
defaulting to copying.

Test Plan:
Press +Ctrl while dragging an image from either View or
Browse mode to Dolphin. A cursor indicating the linking action
should be shown instead of the panning cursor.

Reviewers: Gwenview, huoni

Reviewed By: Gwenview, huoni

Subscribers: huoni

Differential Revision: https://phabricator.kde.org/D13725

Details

Committed
rkflxJul 8 2018, 10:51 PM
Reviewer
Gwenview
Differential Revision
D13725: Show more appropriate cursor when dragging and enable modifier keys
Parents
R260:3215716e422e: Do not allow to drag an image onto itself
Branches
Unknown
Tags
Unknown