- } else {
- m_action = m_collection ? m_collection->action(QStringLiteral("move_to_trash")) : 0;
- setText(i18nc("@action:inmenu", "&Move to Trash"));
- m_collection->setDefaultShortcuts(this, m_action->shortcuts());
+ break;
+ }
+ case ShiftState::Released: {
+ m_action = m_collection->action(KStandardAction::name(KStandardAction::MoveToTrash));
+ // 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;