]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinremoveaction.cpp
GIT_SILENT made messages (after extraction)
[dolphin.git] / src / dolphinremoveaction.cpp
index ab1117770f2b76537d675b325cb3bcc60ad4dcfd..078aa3dd42f75e564304cd3ea0f5a41dd8f6231a 100644 (file)
@@ -22,9 +22,6 @@
 
 #include <QApplication>
 
-#include <KLocalizedString>
-
-
 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;