Review Request 117782: DolphinMainWindow: do not update the "Paste" action every time the selection changes

Emmanuel Pescosta emmanuelpescosta099 at gmail.com
Tue Apr 29 22:56:17 BST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117782/#review56932
-----------------------------------------------------------

Ship it!


Ship It!

- Emmanuel Pescosta


On April 26, 2014, 1:16 p.m., Frank Reininghaus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117782/
> -----------------------------------------------------------
> 
> (Updated April 26, 2014, 1:16 p.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Bugs: 333903
>     http://bugs.kde.org/show_bug.cgi?id=333903
> 
> 
> Repository: kde-baseapps
> 
> 
> Description
> -------
> 
> DolphinMainWindow has some functions that enable/disable some of its actions:
> 
> * updateEditAcions() updates, e.g., rename, copy, cut. These actions should only be enabled if the current location is writable, and at least one file is selected. Therefore, it is called if the selection in the view changes.
> 
> * updatePasteAction() updates the paste action. This has to be done if the clipboard contents change, beccause the action text is based on the clipboard contents. Moreover, it needs to be updated if the current URL is changed.
> 
> Note that updatePasteAction() can be very expensive if many files are in the clipboard.
> 
> The problem is that updatePasteAction() is called by updateEditActions() - this means that the possibly expensive re-parsing of the clipboard contents is done every time the selection changes (e.g., when an arrow key is pressed). This is not necessary at all.
> 
> The solution is to not call updatePasteAction() there, but to call it explicitly in all places where it is really needed.
> 
> 
> Diffs
> -----
> 
>   dolphin/src/dolphinmainwindow.cpp 8473014 
> 
> Diff: https://git.reviewboard.kde.org/r/117782/diff/
> 
> 
> Testing
> -------
> 
> Fixes the slowness for me. I haven't found any problems yet - it seems that the paste action is always updated correctly for me.
> 
> 
> Thanks,
> 
> Frank Reininghaus
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20140429/8d3b85ad/attachment.htm>


More information about the kfm-devel mailing list