From 68bb0ec22af0290d298a87a15006f888b0aaf3b9 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Fri, 10 Mar 2017 19:31:33 +0100 Subject: 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 --- src/dolphinremoveaction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dolphinremoveaction.cpp') diff --git a/src/dolphinremoveaction.cpp b/src/dolphinremoveaction.cpp index 10ab25112..ad00f6286 100644 --- a/src/dolphinremoveaction.cpp +++ b/src/dolphinremoveaction.cpp @@ -46,7 +46,7 @@ void DolphinRemoveAction::update() // This is only done until the original action has been shown at least once. To // bypass this issue, the text and &-shortcut is applied manually. if (qApp->queryKeyboardModifiers() & Qt::ShiftModifier) { - m_action = m_collection ? m_collection->action(QStringLiteral("delete")) : 0; + m_action = m_collection ? m_collection->action(KStandardAction::name(KStandardAction::DeleteFile)) : 0; setText(i18nc("@action:inmenu", "&Delete")); } else { m_action = m_collection ? m_collection->action(QStringLiteral("move_to_trash")) : 0; -- cgit v1.3