summaryrefslogtreecommitdiff
blob: 7405dace6be1ed0dabd995696bdfe23d837f89e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 15c7926377065da0fea111be303816dca91d087a Mon Sep 17 00:00:00 2001
From: Nate Graham <nate@kde.org>
Date: Tue, 15 Sep 2020 13:31:48 -0600
Subject: [PATCH] Use KDE shortcuts for "move to trash" action coming from
 QStandardKey

QKeySequence::Delete is the Qt "Move to trash" action, which, by
default, includes Ctrl+D as a shortcut. This is something we don't want
in KDE software, so we need to intercept this action in our integration
plugin and give it the standard KDE shortcuts instead, as we do for
other actions.

BUG: 426573
FIXED-IN: 5.20
---
 src/platformtheme/kdeplatformtheme.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/platformtheme/kdeplatformtheme.cpp b/src/platformtheme/kdeplatformtheme.cpp
index 24ac7e7..18b3f6f 100644
--- a/src/platformtheme/kdeplatformtheme.cpp
+++ b/src/platformtheme/kdeplatformtheme.cpp
@@ -257,6 +257,8 @@ QList<QKeySequence> KdePlatformTheme::keyBindings(QKeySequence::StandardKey key)
         return KStandardShortcut::shortcut(KStandardShortcut::TabNext);
     case QKeySequence::PreviousChild:
         return KStandardShortcut::shortcut(KStandardShortcut::TabPrev);
+    case QKeySequence::Delete:
+        return KStandardShortcut::shortcut(KStandardShortcut::MoveToTrash);
     default:
         return QPlatformTheme::keyBindings(key);
     }
-- 
GitLab