aboutsummaryrefslogtreecommitdiff
path: root/src/gui/kstandardshortcut.cpp
diff options
context:
space:
mode:
authorLeslie Zhai <xiangzhai83@gmail.com>2016-08-01 09:27:36 +0800
committerLeslie Zhai <xiangzhai83@gmail.com>2016-08-01 09:27:36 +0800
commit0fc5d6db714697ff5a3756f315d2177db1b8e354 (patch)
tree30264cbf8cd95cc7dc0b5c19dbf2fa0d3604b71e /src/gui/kstandardshortcut.cpp
parent364921187d4d3291105fc7b0a4b1cacd41a6aadf (diff)
downloadkconfig-0fc5d6db714697ff5a3756f315d2177db1b8e354.tar.gz
kconfig-0fc5d6db714697ff5a3756f315d2177db1b8e354.tar.bz2
Add DeleteFile and RenameFile standard shortcut.
REVIEW: 128517
Diffstat (limited to 'src/gui/kstandardshortcut.cpp')
-rw-r--r--src/gui/kstandardshortcut.cpp15
1 files changed, 15 insertions, 0 deletions
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<QKeySequence>(), false },
{ AboutApp, "AboutApp", QT_TRANSLATE_NOOP3("KStandardShortcut", "About Application", "@action"), 0, 0, QList<QKeySequence>(), false },
{ AboutKDE, "AboutKDE", QT_TRANSLATE_NOOP3("KStandardShortcut", "About KDE", "@action"), 0, 0, QList<QKeySequence>(), false },
+ { DeleteFile, "DeleteFile", QT_TRANSLATE_NOOP3("KStandardShortcut", "Delete File", "@action"), SHIFT(Delete), 0, QList<QKeySequence>(), false },
+ { RenameFile, "RenameFile", QT_TRANSLATE_NOOP3("KStandardShortcut", "Rename File", "@action"), Qt::Key_F2, 0, QList<QKeySequence>(), false },
+ { MoveToTrash, "MoveToTrash", QT_TRANSLATE_NOOP3("KStandardShortcut", "Move to Trash", "@action"), Qt::Key_Delete, 0, QList<QKeySequence>(), false },
//dummy entry to catch simple off-by-one errors. Insert new entries before this line.
{ AccelNone, 0, {0, 0}, 0, 0, QList<QKeySequence>(), false }
@@ -517,5 +520,17 @@ const QList<QKeySequence> &showMenubar()
{
return shortcut(ShowMenubar);
}
+const QList<QKeySequence> &deleteFile()
+{
+ return shortcut(DeleteFile);
+}
+const QList<QKeySequence> &renameFile()
+{
+ return shortcut(RenameFile);
+}
+const QList<QKeySequence> &moveToTrash()
+{
+ return shortcut(MoveToTrash);
+}
}