]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinviewactionhandler.cpp
Add option to only search for folders
[dolphin.git] / src / views / dolphinviewactionhandler.cpp
index 447d46f53cbfb3b27e39001ac82a940908c26e30..d0b9e7dc1ea6eb0e3505f87d1c5b87ee9195d7c1 100644 (file)
@@ -110,7 +110,12 @@ void DolphinViewActionHandler::createActions()
     KStandardAction::renameFile(this, &DolphinViewActionHandler::slotRename, m_actionCollection);
 
     KStandardAction::moveToTrash(this, &DolphinViewActionHandler::slotTrashActivated, m_actionCollection);
-    KStandardAction::deleteFile(this, &DolphinViewActionHandler::slotDeleteItems, m_actionCollection);
+    auto deleteAction = KStandardAction::deleteFile(this, &DolphinViewActionHandler::slotDeleteItems, m_actionCollection);
+    auto deleteShortcuts = deleteAction->shortcuts();
+    if (!deleteShortcuts.contains(Qt::SHIFT | Qt::Key_Delete)) {
+        deleteShortcuts.append(Qt::SHIFT | Qt::Key_Delete);
+        m_actionCollection->setDefaultShortcuts(deleteAction, deleteShortcuts);
+    }
 
     // This action is useful for being enabled when KStandardAction::MoveToTrash should be
     // disabled and KStandardAction::DeleteFile is enabled (e.g. non-local files), so that Key_Del