Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Dolphin Dolphin
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 39
    • Merge requests 39
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • SystemSystem
  • DolphinDolphin
  • Merge requests
  • !79

Fix delete action switching via 'Shift' when sub-context-menu is open

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Derek Christ requested to merge derek/dolphin:context-menu-fix into master Oct 15, 2020
  • Overview 12
  • Commits 1
  • Pipelines 0
  • Changes 2

This merge request is an attempt to fix the currently not working switching of the 'Move to Trash' action to 'Delete' using the shift key when the mouse hovers a submenu.

I removed the overwritten key event functions and instead added an event filter. The problem of the current implementation is that the keyPressedEvent() and keyReleasedEvent() functions for some reason don't get called when the shift button is pressed and a sub-menu is visible. However the new eventFilter() does get called in these circuumstances when the filter is installed into the new sub-context-menus. This is done in the childEvent() function.

This fix works for almost all sub-menus. The submenus created by "addPluginActionsTo", which implement 'Tags', 'Activities' and 'Compress' do not work yet.

This fix follows a bit of a hacky approach, so I'm almost sure there is a better way to fix the issue, but we can discuss these better ways here.

Please point out when something in my fix is bad practice, because I'm new to Qt programming.

BUG: 425997

Edited Nov 23, 2020 by Méven Car
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: context-menu-fix