┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinpart.cpp
diff options
context:
space:
mode:
authorElvis Angelaccio <[email protected]>2017-07-19 00:00:37 +0200
committerElvis Angelaccio <[email protected]>2017-07-27 16:15:03 +0200
commit4b5ea05b6760e9020ab87f1d90071e1a2a8f9e99 (patch)
treed1c87653f2ebaecdf0cb5b110b24a7242f4cc3d6 /src/dolphinpart.cpp
parent82b2dbd3ec568a6e6fe01a8e75739b25cae25f15 (diff)
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
Diffstat (limited to 'src/dolphinpart.cpp')
-rw-r--r--src/dolphinpart.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp
index ef9b300ca..0e771accb 100644
--- a/src/dolphinpart.cpp
+++ b/src/dolphinpart.cpp
@@ -254,7 +254,7 @@ void DolphinPart::slotSelectionChanged(const KFileItemList& selection)
const bool hasSelection = !selection.isEmpty();
QAction* renameAction = actionCollection()->action(QStringLiteral("rename"));
- QAction* moveToTrashAction = actionCollection()->action(QStringLiteral("move_to_trash"));
+ QAction* moveToTrashAction = actionCollection()->action(KStandardAction::name(KStandardAction::MoveToTrash));
QAction* deleteAction = actionCollection()->action(KStandardAction::name(KStandardAction::DeleteFile));
QAction* editMimeTypeAction = actionCollection()->action(QStringLiteral("editMimeType"));
QAction* propertiesAction = actionCollection()->action(QStringLiteral("properties"));
@@ -432,7 +432,7 @@ void DolphinPart::slotOpenContextMenu(const QPoint& pos,
if (showDeleteAction && showMoveToTrashAction) {
delete m_removeAction;
m_removeAction = 0;
- editActions.append(actionCollection()->action(QStringLiteral("move_to_trash")));
+ editActions.append(actionCollection()->action(KStandardAction::name(KStandardAction::MoveToTrash)));
editActions.append(actionCollection()->action(KStandardAction::name(KStandardAction::DeleteFile)));
} else if (showDeleteAction && !showMoveToTrashAction) {
editActions.append(actionCollection()->action(KStandardAction::name(KStandardAction::DeleteFile)));