Refactoring D&D/Paste As feature for 5.1

Dmitry Kazakov dimula73 at gmail.com
Tue Jan 4 10:30:35 GMT 2022


Hi, amyspark!

We have never discussed that before. As far as I can tell, the requirements
for the new system should be something like this:

1) All mimedata handling routines should use common code (or at least
common policy/priorities)
    * D&D into the start page
    * D&D into KisView (that is, to an opened document)
    * D&D into Layers Docker
    * Paste from the clipboard
2) If mimetype has multiple formats, then they should be tried in the order
of (user customizable?) priority
    * all places should use the same priority (now the code is ad-hoc, so
the requirement is not fulfilled)
    * if one format exists, but fails, Krita should add warning to the log
and continue to a different format (now it stops on the first found
supported format)
3) The tests for D&D should be done for the matrix of configurations on
Chrome/Firefox/Safari versus Windows/Linux/MacOS. The same browser provides
different mimedata on different platforms


On Thu, Dec 30, 2021 at 1:53 AM L. E. Segovia <amy at amyspark.me> wrote:

> Hi all,
>
> I've previously submitted MR
> https://invent.kde.org/graphics/krita/-/merge_requests/1177/ to
> implement a consent flow for paste/drag-n-drop events that include an
> image URL.
>
> It's been marked as Needs Changes because we need a bigger refactor, the
> implementation is currently sprawled across five different classes, with
> potentially duplicate (or at the very least inconsistent) behaviour.
>
> Has this been discussed before? When could we set some time to check it
> out?
>
> Best,
>
> amyspark
>
> --
> amyspark 🌸 https://www.amyspark.me
>


-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20220104/919e0956/attachment.htm>


More information about the kimageshop mailing list