aboutsummaryrefslogtreecommitdiff
path: root/src/gui/kstandardshortcut.cpp
diff options
context:
space:
mode:
authorNate Graham <nate@kde.org>2020-04-13 12:21:57 -0600
committerNate Graham <nate@kde.org>2020-04-13 13:57:07 -0600
commit65cc12ab3ec8ca313d0e9d9b6d506e9fa9042bc1 (patch)
tree4753751c363bf2b008fad50629ccec7ddeb4f1fe /src/gui/kstandardshortcut.cpp
parentdd478895004757bd1583c77e79a7f882575df1c0 (diff)
downloadkconfig-65cc12ab3ec8ca313d0e9d9b6d506e9fa9042bc1.tar.gz
kconfig-65cc12ab3ec8ca313d0e9d9b6d506e9fa9042bc1.tar.bz2
Add standard shortcut for "Show/Hide Hidden Files"
Summary: Add a standard shortcut for this action so it can be synchronized between different apps and the file dialog; see https://bugs.kde.org/show_bug.cgi?id=262551. The action in Dolphin also has F8 bound to this, but the definition here only accept two default shortcuts, and F8 seems kind of random. CCBUG: 262551 Test Plan: Apply D28803 to KIO and D28804 to Dolphin and test there Reviewers: dfaure, #frameworks Reviewed By: dfaure Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D28802
Diffstat (limited to 'src/gui/kstandardshortcut.cpp')
-rw-r--r--src/gui/kstandardshortcut.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kstandardshortcut.cpp b/src/gui/kstandardshortcut.cpp
index 2bf978cc..b9bce5ed 100644
--- a/src/gui/kstandardshortcut.cpp
+++ b/src/gui/kstandardshortcut.cpp
@@ -166,6 +166,7 @@ static KStandardShortcutInfo g_infoStandardShortcut[] = {
{ RenameFile, "RenameFile", QT_TRANSLATE_NOOP3("KStandardShortcut", "Rename", "@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 },
{ Donate, "Donate", QT_TRANSLATE_NOOP3("KStandardShortcut", "Donate", "@action"), 0, 0, QList<QKeySequence>(), false },
+ { ShowHideHiddenFiles, "ShowHideHiddenFiles", QT_TRANSLATE_NOOP3("KStandardShortcut", "Show/Hide Hidden Files", "@action"), CTRL(H), ALT(Period), QList<QKeySequence>(), false },
//dummy entry to catch simple off-by-one errors. Insert new entries before this line.
{ AccelNone, nullptr, {nullptr, nullptr}, 0, 0, QList<QKeySequence>(), false }
@@ -557,4 +558,9 @@ const QList<QKeySequence> &preferences()
return shortcut(Preferences);
}
+const QList<QKeySequence> &showHideHiddenFiles()
+{
+ return shortcut(ShowHideHiddenFiles);
+}
+
}