In View mode, dragging can only ever pan a zoomed in image. In all other
cases it does nothingThis patch adds drag functionality to {nav View} mode. This patch initiates a drag drop operationA
instead in those other cases, but keeps the panndrag operation is only initiated if dragging functionality.wouldn't
This works for videos as well as images,otherwise do something, e.g. and also functions inwhen zoomed and the image is
comparison modepannable, or the crop tool is active.
When dragging a document, we check if it is zoomable, and if so whetherIn order to get a drag pixmap for all cases (videos
any part of it is not visible.included), If both are true,we use KIO to generate a file preview. we assume panning isHowever,
possible and therefore abortif the drag drop operation.
I wanted to display a drag pixmap of the imageimage is modified, but not exclude videos,we generate a new pixmap using
so I added a sort of generic `thumbnailRepresentation` function,the edited version. which isUsing `MimeTypeUtils::selectionMimeData`,
implemented differently for each adapter type. Videos simply return anthis should mean the drag pixmap always matches the image
icon converted to a `QPixmap`the receiving application gets.
BUG: 386034
FIXED-IN: 18.08.0
{F5781358}