diff options
| author | Elvis Angelaccio <[email protected]> | 2017-03-10 19:31:33 +0100 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2017-03-13 19:40:07 +0100 |
| commit | 68bb0ec22af0290d298a87a15006f888b0aaf3b9 (patch) | |
| tree | 39ac14dadede61bc47b1024a962e2db790ca7a3a /src/dolphinpart.cpp | |
| parent | 042b0c84099c062847fa2ed46a145624a96f90ca (diff) | |
Port to KStandardAction::DeleteFile
Summary:
It was introduced in kconfig 5.25 and it properly handles the shift+del
shortcut (together with kxmlgui >= 5.30). This allows us to drop the
custom delete shortcut as well as the shift+del workaround in
DolphinMainWindow.
Test Plan: Shift+Del still deletes files, without the 'ambiguous shortcut' warning dialog.
Reviewers: emmanuelp
Differential Revision: https://phabricator.kde.org/D5010
Diffstat (limited to 'src/dolphinpart.cpp')
| -rw-r--r-- | src/dolphinpart.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index b55bcabb2..352e9a44f 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -255,7 +255,7 @@ void DolphinPart::slotSelectionChanged(const KFileItemList& selection) QAction* renameAction = actionCollection()->action(QStringLiteral("rename")); QAction* moveToTrashAction = actionCollection()->action(QStringLiteral("move_to_trash")); - QAction* deleteAction = actionCollection()->action(QStringLiteral("delete")); + QAction* deleteAction = actionCollection()->action(KStandardAction::name(KStandardAction::DeleteFile)); QAction* editMimeTypeAction = actionCollection()->action(QStringLiteral("editMimeType")); QAction* propertiesAction = actionCollection()->action(QStringLiteral("properties")); QAction* deleteWithTrashShortcut = actionCollection()->action(QStringLiteral("delete_shortcut")); // see DolphinViewActionHandler @@ -433,9 +433,9 @@ void DolphinPart::slotOpenContextMenu(const QPoint& pos, delete m_removeAction; m_removeAction = 0; editActions.append(actionCollection()->action(QStringLiteral("move_to_trash"))); - editActions.append(actionCollection()->action(QStringLiteral("delete"))); + editActions.append(actionCollection()->action(KStandardAction::name(KStandardAction::DeleteFile))); } else if (showDeleteAction && !showMoveToTrashAction) { - editActions.append(actionCollection()->action(QStringLiteral("delete"))); + editActions.append(actionCollection()->action(KStandardAction::name(KStandardAction::DeleteFile))); } else { if (!m_removeAction) m_removeAction = new DolphinRemoveAction(this, actionCollection()); |
