Review Request 108802: Switch Delete/Move To Trash actions when Shift key is pressed in Konqueror context menu

Dawit Alemayehu adawit at
Mon May 13 02:35:23 BST 2013

This is an automatically generated e-mail. To reply, visit:

(Updated May 13, 2013, 1:35 a.m.)

Review request for KDE Base Apps, David Faure and Frank Reininghaus.


- Factored out the Delete/Move To Trash action into own class, DolphinRemoveAction.
- Updated both the DolphinPart and DolphinContextMenu to use this new DolphinRemoveAction class to manage "Delete/Move to Trash" actions.

The only thing I am unsure of is whether or not the new shared action class should be added to libdolphinprivate or not. It seemed to me to be the logical place to put it since it is shared by both the Dolphin binary as well as the kpart. Otherwise, this seems to work well for both Konqueror as well as Dolphin. It is also much cleaner to look at.


This patch fixes DolphinPart such that the "Delete/Move To Trash" actions are automatically toggled if the user presses the Shift key and allows to be applied.

The code is completely based on what Dolphin's context menu does. Even though this works as planned, I still have reservations about the use of KModifierKeyInfo since every key press event from any application is sent to the application that connects to its signals. In my code and unlike what is done in Dolphin's context menu, I try to mitigate the impact of that by ignoring the signal when the part does not have the focus. Still if there is a better way to capture key press events at the part level I would like to use that instead. Any ideas ?

Diffs (updated)

  dolphin/src/CMakeLists.txt ffb232c 
  dolphin/src/dolphincontextmenu.h 1c65fab 
  dolphin/src/dolphincontextmenu.cpp 89a169f 
  dolphin/src/dolphinpart.h 7881ded 
  dolphin/src/dolphinpart.cpp 627ba79 
  dolphin/src/dolphinremoveaction.h PRE-CREATION 
  dolphin/src/dolphinremoveaction.cpp PRE-CREATION 




Dawit Alemayehu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list