Bug 382797 - Moving files per drag and drop and shift-key (within folder-view) does not work.
Summary: Moving files per drag and drop and shift-key (within folder-view) does not work.
Status: CLOSED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop icons & Folder View widget (other bugs)
Version First Reported In: 5.8.6
Platform: Debian stable Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-27 11:45 UTC by Gerhard Dittes
Modified: 2018-03-25 17:18 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.11.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerhard Dittes 2017-07-27 11:45:23 UTC
Hi,

this bug affects the "folder widget" and not "dolphin" (for which some related bugs were resolved long time ago).

I can reproduce this behavior on current "Debian stable" (plasma-desktop 5.8.6; plasma-framework 5.28) as well as on "KDE Neon user edition" (plasma-desktop 5.10.4; plasma-framework 5.36):

When you try to move files into subfolders while pressing the "shift-key", files get "copied" instead of "moved". So there is no difference between the "shift-key" and the "ctrl-key".

This is very annoying and prevents efficient file management via desktop facilities.

...even more, when choosing "folder-view" to be the "default desktop layout" (what -- as of plasma 5.10 -- is the default setting).
Comment 1 Kai Uwe Broulik 2017-07-27 14:25:00 UTC
Qt tries to determin the default action based on modifiers (e.g. Shift+Ctrl = Link).

QXcbDrag does defaultAction(currentDrag()->supportedActions(), QGuiApplication::keyboardModifiers()) and QPlatformDrag::defaultAction() performs the check for keyboard modifiers. I'm quite lost as to why it works in Dolphin but not FolderView. I tried placing a qApp->queryKeyboardModifiers() before doing exec()'ing the QDrag but that didn't help. Also, at any point from what I can tell the keyboard modifiers QGuiApplication thinks of are indeed correct :/
Comment 2 Kai Uwe Broulik 2017-09-14 08:27:41 UTC
Git commit 6b8fa112f47d6ed5794167b737007e35a7817746 by Kai Uwe Broulik.
Committed on 14/09/2017 at 08:26.
Pushed by broulik into branch 'master'.

[Folder View] Fix supported drag actions

SetSupportedDragActions is deprecated and doesn't seem to work.
This fixes modifier shortcuts for dragging, e.g. dragging with Ctrl+Shift to create a link.
FIXED-IN: 5.11.0

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

M  +5    -2    containments/desktop/plugins/folder/foldermodel.cpp
M  +1    -0    containments/desktop/plugins/folder/foldermodel.h

https://commits.kde.org/plasma-desktop/6b8fa112f47d6ed5794167b737007e35a7817746