X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/fd98230020bdbdd051bbb11193a61097f169479b..6861a876830e301878b65cb4e4574bfda4c73340:/src/dolphinviewactionhandler.cpp diff --git a/src/dolphinviewactionhandler.cpp b/src/dolphinviewactionhandler.cpp index 938ce785d..b606c33ea 100644 --- a/src/dolphinviewactionhandler.cpp +++ b/src/dolphinviewactionhandler.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include @@ -93,6 +92,17 @@ void DolphinViewActionHandler::createActions() deleteAction->setShortcut(Qt::SHIFT | Qt::Key_Delete); connect(deleteAction, SIGNAL(triggered()), this, SLOT(slotDeleteItems())); + // This action is useful for being enabled when "move_to_trash" should be + // disabled and "delete" is enabled (e.g. non-local files), so that Key_Del + // can be used for deleting the file (#76016). It needs to be a separate action + // so that the Edit menu isn't affected. + KAction* deleteWithTrashShortcut = m_actionCollection->addAction("delete_shortcut"); + // TODO after message freeze, a more descriptive text, for the shortcuts editor. + deleteWithTrashShortcut->setText(i18nc("@action:inmenu File", "Delete")); + deleteWithTrashShortcut->setShortcut(QKeySequence::Delete); + deleteWithTrashShortcut->setEnabled(false); + connect(deleteWithTrashShortcut, SIGNAL(triggered()), this, SLOT(slotDeleteItems())); + // View menu QActionGroup* viewModeActions = new QActionGroup(this);