[Folder View] Disable the actions themselves rather than just not adding them…

Authored by broulik on Sep 6 2018, 8:49 AM.

Description

[Folder View] Disable the actions themselves rather than just not adding them to the menu

Folder View is built on the assumption that actions can only be triggered from the context menu.
This isn't true as keyboard shortcuts can trigger actions which will only get their correct state just before the menu opens.
Moreover, often the action itself isn't disabled/hidden but just not added to the menu, which means it can still be triggered
using a keyboard shortcut.

This patch changes the context menu to always include all (most of them, anyway) actions but instead have updateActions() disable
or hide them as needed.

Also, take into account KFileItemListProperties for more actions (e.g. Cut, Paste, Rename, Trash, …) like Dolphin does it.

Differential Revision: https://phabricator.kde.org/D15162