DolphinMainWindow: do not update the "Paste" action every time the selection changes
Review Request #117782 - Created April 26, 2014 and submitted
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.
Fixes the slowness for me. I haven't found any problems yet - it seems that the paste action is always updated correctly for me.