From 5481709016a55bda94177217838318e4e3e7d370 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Wed, 9 Aug 2017 22:59:38 +0200 Subject: Port to KStandardAction::RenameFile It was introduced in kconfig(widgets) 5.25. Using the standard action results in less code and no need to hardcode the F2 shortcut. Differential Revision: https://phabricator.kde.org/D6777 --- src/dolphincontextmenu.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/dolphincontextmenu.cpp') diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 7ee9562ae..b297fb7fb 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -392,8 +392,7 @@ void DolphinContextMenu::insertDefaultItemActions(const KFileItemListProperties& addSeparator(); // Insert 'Rename' - QAction* renameAction = collection->action(QStringLiteral("rename")); - addAction(renameAction); + addAction(collection->action(KStandardAction::name(KStandardAction::RenameFile))); // Insert 'Move to Trash' and/or 'Delete' if (properties.supportsDeleting()) { -- cgit v1.3