https://bugs.kde.org/show_bug.cgi?id=415917

--- Comment #8 from tr...@yandex.com ---
Git commit f8be3ea7102fbd584da1a39f5285ca72b5e69afa by Tranter Madi.
Committed on 04/02/2020 at 05:54.
Pushed by trmdi into branch 'master'.

Optimize code when dropping files into the desktop

Summary:
Currently, when you have the desktop in the Desktop layout, if you drop 10 jpg
files into the desktop, it creates 10 menus at the same position.
When you have the desktop in the Folder layout, if you drop 10 jpg files into
the desktop, it calls `KIO::setApplicationActions()` 10 times.

What does this improve?

- Do not create KIO::MimetypeJob for each file
- Do not call `DropJob::setApplicationActions()` too many times/ create too
many menus for each file.

My idea is that, when you drop files into the desktop:
- If they have the same `mimetype` -> we add actions support this `mimetype`.
- If not -> we only show the action from `KIO::DropJob` and only actions
support different `mimetypes` at the same time like `Add icon`...

**Require:** D26484

Reviewers: #plasma, mart, broulik, #vdg, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, anthonyfieroni, #plasma, kde-frameworks-devel

Tags: #frameworks

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

M  +95   -152  src/scriptengines/qml/plasmoid/containmentinterface.cpp
M  +2    -4    src/scriptengines/qml/plasmoid/containmentinterface.h
A  +110  -0    src/scriptengines/qml/plasmoid/dropmenu.cpp     [License: LGPL
(v2+)]
A  +66   -0    src/scriptengines/qml/plasmoid/dropmenu.h     [License: LGPL
(v2+)]

https://commits.kde.org/plasma-framework/f8be3ea7102fbd584da1a39f5285ca72b5e69afa

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to