Summary: | Unable to create a folder on desktop via F10 keyboard shortcut | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Patrick Silva <bugseforuns> |
Component: | general | Assignee: | David Edmundson <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | christ.derek, nate, nl.smart.sam01, plasma-bugs |
Priority: | VHI | Keywords: | regression |
Version: | 5.22.90 | ||
Target Milestone: | 1.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-desktop/commit/d7bcf6dee0c764cf2fdbd022fd0ba4d278ff314e | Version Fixed In: | 5.23.2 |
Description
Patrick Silva
2021-10-09 11:32:49 UTC
Can reproduce. Seems to be caused by the event filter added in https://invent.kde.org/plasma/plasma-desktop/-/commit/1b9b49b9fa823246c1880232e063c97fd7a916eb If I comment out these lines in foldermodel.cpp, it starts working again: if (RemoveAction *removeAction = qobject_cast<RemoveAction *>(m_actionCollection.action(QStringLiteral("remove")))) { menu->installEventFilter(removeAction); QCoreApplication::instance()->installEventFilter(removeAction); } Derek, would you be able to take a look? Thanks! Hi, I reproduced your steps, no issue, tested on the desktop and dolphin. Operating System: Manjaro 21.1.5 Pahvo KDE Plasma Version: 5.22.5 KDE Frameworks Version: 5.86.0 Qt Version: 5.15.2 Kernel Version: x86_64 Linux 5.10.70-1-MANJARO GTK Theme: Breeze [GTK2/3] Icon Theme: oxygen Graphics Platform: X11 Processors: Intel Core i7-10510U @ 8x 4.9GHz Graphics Processor: Mesa Intel(R) UHD Graphics (CML GT2) That makes sense because you're using Plasma 5.22.5 and this is a regression in 5.22.90 (aka 5.23 beta). :) Dolphin is also not relevant here since the bug is specific to Folder View, which handles the desktop icons. Dolphin isn't involved in that. > Derek, would you be able to take a look? Thanks!
Sorry, I must have missed this. Will have a look
Please try to get rid of ` QApplication::instance()->installEventFilter(this);` It will be causing a sizable amount of overhead for every interaction. (In reply to David Edmundson from comment #6) > Please try to get rid of > ` QApplication::instance()->installEventFilter(this);` > > It will be causing a sizable amount of overhead for every interaction. Sadly this is needed to fix bug 425997. What do you think about removing the filter as soon as the context menu closes? So that it is only installed on QAppliaction when the menu is actually open. >So that it is only installed on QAppliaction when the menu is actually open.
Yes, scoping it would be suitable for me.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/607 Git commit 12350fb1242c4dbfdb547926bdb093eb8da96b4b by Nate Graham, on behalf of Derek Christ. Committed on 19/10/2021 at 14:42. Pushed by ngraham into branch 'master'. Fix create-folder-shortcut (F10) The create folder shortcut worked as long as the user did not right- click into an empty space on the desktop to invoke the context menu. The problem was that the create-folder-action was set to not visible so that it is not shown in the context menu. But as soon as the context menu is opened, the action is set to not visible in the plasmoid contextual action list. The reason it works before opening the menu is because the action for the plasmoid is created without setting it to not visible. This commit fixes the bug by using an already existing workaround class that uses an event filter to respond to the KStandardShortcut::createFolder key sequence. M +5 -0 containments/desktop/package/contents/ui/FolderView.qml M +1 -1 containments/desktop/package/contents/ui/FolderViewLayer.qml M +0 -6 containments/desktop/plugins/folder/foldermodel.cpp M +2 -0 containments/desktop/plugins/folder/shortcut.cpp M +1 -0 containments/desktop/plugins/folder/shortcut.h https://invent.kde.org/plasma/plasma-desktop/commit/12350fb1242c4dbfdb547926bdb093eb8da96b4b Git commit d7bcf6dee0c764cf2fdbd022fd0ba4d278ff314e by Nate Graham, on behalf of Derek Christ. Committed on 19/10/2021 at 14:44. Pushed by ngraham into branch 'Plasma/5.23'. Fix create-folder-shortcut (F10) The create folder shortcut worked as long as the user did not right- click into an empty space on the desktop to invoke the context menu. The problem was that the create-folder-action was set to not visible so that it is not shown in the context menu. But as soon as the context menu is opened, the action is set to not visible in the plasmoid contextual action list. The reason it works before opening the menu is because the action for the plasmoid is created without setting it to not visible. This commit fixes the bug by using an already existing workaround class that uses an event filter to respond to the KStandardShortcut::createFolder key sequence. (cherry picked from commit 12350fb1242c4dbfdb547926bdb093eb8da96b4b) M +5 -0 containments/desktop/package/contents/ui/FolderView.qml M +1 -1 containments/desktop/package/contents/ui/FolderViewLayer.qml M +0 -6 containments/desktop/plugins/folder/foldermodel.cpp M +2 -0 containments/desktop/plugins/folder/shortcut.cpp M +1 -0 containments/desktop/plugins/folder/shortcut.h https://invent.kde.org/plasma/plasma-desktop/commit/d7bcf6dee0c764cf2fdbd022fd0ba4d278ff314e |