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

Dawit Alemayehu adawit at kde.org
Mon May 13 02:29:28 BST 2013



> On May 5, 2013, 10:16 p.m., David Faure wrote:
> > dolphin/src/dolphinpart.cpp, line 623
> > <http://git.reviewboard.kde.org/r/108802/diff/2/?file=142264#file142264line623>
> >
> >     Same code as in dolphincontextmenu. If it can't be shared, at least there should be a comment about where the code comes from, for easier maintainance.

I will look to see if this code can be refactored and shared between these two classes.


> On May 5, 2013, 10:16 p.m., David Faure wrote:
> > dolphin/src/dolphinpart.cpp, line 664
> > <http://git.reviewboard.kde.org/r/108802/diff/2/?file=142264#file142264line664>
> >
> >     There are other ways to bring the context menu than the right button. There's the context key, too.
> >     So better watch for the QEvent::ContextMenu event instead of hardcoding "release of right button", if it really has to be done with the event filter.

QEvent::ContextMenu won't work. That is the first thing I tried. I think the context menu event is consumed by some widget that emits its own specialized signal signal (requestContextMenu). Anyhow, that does not matter. I realized it is not need in this instance. See updated patch.


- Dawit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108802/#review32111
-----------------------------------------------------------


On May 5, 2013, 1:53 p.m., Dawit Alemayehu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108802/
> -----------------------------------------------------------
> 
> (Updated May 5, 2013, 1:53 p.m.)
> 
> 
> Review request for KDE Base Apps, David Faure and Frank Reininghaus.
> 
> 
> Description
> -------
> 
> This patch fixes DolphinPart such that the "Delete/Move To Trash" actions are automatically toggled if the user presses the Shift key and allows  https://git.reviewboard.kde.org/r/107509/ 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
> -----
> 
>   dolphin/src/dolphinpart.h 7881ded 
>   dolphin/src/dolphinpart.cpp 627ba79 
> 
> Diff: http://git.reviewboard.kde.org/r/108802/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dawit Alemayehu
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130513/f596bdf5/attachment.htm>


More information about the kde-core-devel mailing list