From 4b5ea05b6760e9020ab87f1d90071e1a2a8f9e99 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Wed, 19 Jul 2017 00:00:37 +0200 Subject: Port to KStandardAction::MoveToTrash It was introduced in kconfig(widgets) 5.25. Using the standard action results in less code and no need to hardcode the Del shortcut. Test Plan: - Change shortcut in System Settings -> Shortcuts -> Standard Shortcuts - Make sure the new shortcut is used by dolphin. Differential Revision: https://phabricator.kde.org/D6778 --- src/dolphinmainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dolphinmainwindow.cpp') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 3d6f8489d..194666be3 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1317,7 +1317,7 @@ void DolphinMainWindow::updateEditActions() KActionCollection* col = actionCollection(); QAction* renameAction = col->action(QStringLiteral("rename")); - QAction* moveToTrashAction = col->action(QStringLiteral("move_to_trash")); + QAction* moveToTrashAction = col->action(KStandardAction::name(KStandardAction::MoveToTrash)); QAction* deleteAction = col->action(KStandardAction::name(KStandardAction::DeleteFile)); QAction* cutAction = col->action(KStandardAction::name(KStandardAction::Cut)); QAction* deleteWithTrashShortcut = col->action(QStringLiteral("delete_shortcut")); // see DolphinViewActionHandler -- cgit v1.3