X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/49396318f0f37f913a91bf02484a16e34fec6bf4..2fd2f621b70a2272242d2a97420b2537a3db0edd:/src/dolphinremoveaction.cpp diff --git a/src/dolphinremoveaction.cpp b/src/dolphinremoveaction.cpp index ab1117770..078aa3dd4 100644 --- a/src/dolphinremoveaction.cpp +++ b/src/dolphinremoveaction.cpp @@ -22,9 +22,6 @@ #include -#include - - DolphinRemoveAction::DolphinRemoveAction(QObject* parent, KActionCollection* collection) : QAction(parent), m_collection(collection) @@ -61,10 +58,15 @@ void DolphinRemoveAction::update(ShiftState shiftState) m_collection->setDefaultShortcuts(this, deleteShortcuts); break; } - case ShiftState::Released: + case ShiftState::Released: { m_action = m_collection->action(KStandardAction::name(KStandardAction::MoveToTrash)); - m_collection->setDefaultShortcuts(this, m_action->shortcuts()); + // Make sure we show Del in the context menu. + auto trashShortcuts = m_action->shortcuts(); + trashShortcuts.removeAll(QKeySequence::Delete); + trashShortcuts.prepend(QKeySequence::Delete); + m_collection->setDefaultShortcuts(this, trashShortcuts); break; + } case ShiftState::Unknown: Q_UNREACHABLE(); break;