Summary: | Shift key toggles "delete" and "move to trash" entries the wrong order | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | g111 |
Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bugseforuns, carlos.gomez.palacin, elvis.angelaccio, notuxius, wbauer1 |
Priority: | NOR | Keywords: | wayland |
Version: | 16.12.2 | ||
Target Milestone: | --- | ||
Platform: | Kubuntu | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/dolphin/2fd85facf85b39f84eeada10bcf80060bb72ab51 | Version Fixed In: | 16.08.2 |
Description
g111
2015-10-24 13:03:03 UTC
I can confirm this on openSUSE with the latest dolphin 15.12.2. In short: pressing Shift doesn't toggle "Move to Trash" to "Delete", only *releasing* it again does. Afterwards every press and release toggles, so the behavior is completely opposite to what it should be. *** Bug 362235 has been marked as a duplicate of this bug. *** I can reproduce, confirming. Patch up for review: https://git.reviewboard.kde.org/r/128972/ Git commit 3775ef19eaca057985b92cfa3716d3c3a1d22f0f by Elvis Angelaccio. Committed on 21/09/2016 at 16:13. Pushed by elvisangelaccio into branch 'Applications/16.08'. Properly check Shift toggling in DolphinRemoveAction Documentation of QGuiApplication::keyboardModifiers() says that "It should be noted this may not reflect the actual keys held on the input device at the time of calling but rather the modifiers as last reported in one of the above events". Since this method is called in DolphinContextMenu's keyPressEvent() and keyReleaseEvent(), the first time that keyboardModifiers() is called it doesn't report that shift has been pressed. Replacing this method with queryKeyboardModifiers() does the job because the latter doesn't care about the event queue. FIXED-IN: 16.08.2 REVIEW: 128972 M +1 -1 src/dolphinremoveaction.cpp http://commits.kde.org/dolphin/3775ef19eaca057985b92cfa3716d3c3a1d22f0f This bug reappeared for me in Wayland session. Distribution: KDE neon Developer Edition Unstable Branches KDE Plasma Version: 5.10.90 KDE Frameworks Version: 5.37.0 Qt Version: 5.9.1 Kernel Version: 4.10.0-32-generic Yep, QGuiApplication::queryKeyboardModifiers() doesn't seem to work on Wayland. Git commit 2fd85facf85b39f84eeada10bcf80060bb72ab51 by Elvis Angelaccio. Committed on 07/09/2017 at 19:31. Pushed by elvisangelaccio into branch 'master'. Fix DolphinRemoveAction Shift toggling on Wayland QGuiApplication::queryKeyboardModifiers() does not work on Wayland [1]. We don't need it in the first place, since we already know (thanks to the key events) whether Shift has been pressed or released. So we can just pass this information to DolphinRemoveAction::update(). [1]: https://bugreports.qt.io/browse/QTBUG-62786 Differential Revision: https://phabricator.kde.org/D7519 M +2 -2 src/dolphincontextmenu.cpp M +2 -1 src/dolphinpart.cpp M +22 -7 src/dolphinremoveaction.cpp M +13 -3 src/dolphinremoveaction.h https://commits.kde.org/dolphin/2fd85facf85b39f84eeada10bcf80060bb72ab51 |