From 0fc5d6db714697ff5a3756f315d2177db1b8e354 Mon Sep 17 00:00:00 2001 From: Leslie Zhai Date: Mon, 1 Aug 2016 09:27:36 +0800 Subject: Add DeleteFile and RenameFile standard shortcut. REVIEW: 128517 --- src/gui/kstandardshortcut.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/gui/kstandardshortcut.cpp') diff --git a/src/gui/kstandardshortcut.cpp b/src/gui/kstandardshortcut.cpp index 6be6309d..6d749455 100644 --- a/src/gui/kstandardshortcut.cpp +++ b/src/gui/kstandardshortcut.cpp @@ -164,6 +164,9 @@ static KStandardShortcutInfo g_infoStandardShortcut[] = { { SwitchApplicationLanguage, "SwitchApplicationLanguage", QT_TRANSLATE_NOOP3("KStandardShortcut", "Switch Application Language", "@action"), 0, 0, QList(), false }, { AboutApp, "AboutApp", QT_TRANSLATE_NOOP3("KStandardShortcut", "About Application", "@action"), 0, 0, QList(), false }, { AboutKDE, "AboutKDE", QT_TRANSLATE_NOOP3("KStandardShortcut", "About KDE", "@action"), 0, 0, QList(), false }, + { DeleteFile, "DeleteFile", QT_TRANSLATE_NOOP3("KStandardShortcut", "Delete File", "@action"), SHIFT(Delete), 0, QList(), false }, + { RenameFile, "RenameFile", QT_TRANSLATE_NOOP3("KStandardShortcut", "Rename File", "@action"), Qt::Key_F2, 0, QList(), false }, + { MoveToTrash, "MoveToTrash", QT_TRANSLATE_NOOP3("KStandardShortcut", "Move to Trash", "@action"), Qt::Key_Delete, 0, QList(), false }, //dummy entry to catch simple off-by-one errors. Insert new entries before this line. { AccelNone, 0, {0, 0}, 0, 0, QList(), false } @@ -517,5 +520,17 @@ const QList &showMenubar() { return shortcut(ShowMenubar); } +const QList &deleteFile() +{ + return shortcut(DeleteFile); +} +const QList &renameFile() +{ + return shortcut(RenameFile); +} +const QList &moveToTrash() +{ + return shortcut(MoveToTrash); +} } -- cgit v1.2.1