Skip to content
Commit 7c43f583 authored by rk flx's avatar rk flx
Browse files

Refactor determining mime data for selection

Summary:
Both copying and drag-and-drop of images requires adding appropriate
mime data to the clipboard and drag handler respectively.

f365a38f implemented support for copying modified images. To be able
to also support drag-and-drop of modified images without having to
duplicate code, we extract the relevant bits into a standalone helper
function.

As in different places the selection is determined either by Qt's
internal models, `contextManager` or a single document, and we don't
have access to the global selection in `contextManager` everywhere, we
standardize on a `KFileItemList` to pass the selection.

While at it, we slightly improve some comments.

Test Plan:
Make sure that copying both unmodified and modified images of various
filetypes works as before and in all modes, in particular {nav Browse},
{nav View} and {nav Compare} (for details, see test plan of
f365a38f).

Reviewers: #gwenview, muhlenpfordt

Reviewed By: #gwenview, muhlenpfordt

Differential Revision: https://phabricator.kde.org/D13248
parent cec36220
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment