File Use-correct-way-to-register-for-a-shortcut.patch of Package kactivitymanagerd
From bd2fab0a52f85cad26c5dd1562313e4138d3352c Mon Sep 17 00:00:00 2001
From: David Edmundson <kde@davidedmundson.co.uk>
Date: Fri, 25 Sep 2020 14:59:03 +0100
Subject: [PATCH] Use correct way to register for a shortcut
setDefaultShortcut sets a default shortcut, but it doesn't bind it to
the action.
We want setShortcut.
setGlobalShortcut wraps both. By setting autoloading, it doesn't
actually overwrite the user-set shortcut if one is set.
BUG: 374575
---
src/service/plugins/globalshortcuts/GlobalShortcutsPlugin.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/service/plugins/globalshortcuts/GlobalShortcutsPlugin.cpp b/src/service/plugins/globalshortcuts/GlobalShortcutsPlugin.cpp
index ec5de6c..0353def 100644
--- a/src/service/plugins/globalshortcuts/GlobalShortcutsPlugin.cpp
+++ b/src/service/plugins/globalshortcuts/GlobalShortcutsPlugin.cpp
@@ -87,7 +87,7 @@ void GlobalShortcutsPlugin::activityAdded(const QString &activity)
objectNamePattern.arg(activity));
action->setText(i18nc("@action", "Switch to activity \"%1\"", activityName(activity)));
- KGlobalAccel::self()->setDefaultShortcut(action, QList<QKeySequence>{});
+ KGlobalAccel::setGlobalShortcut(action, QList<QKeySequence>{});
connect(action, &QAction::triggered, [this, activity]() { Q_EMIT currentActivityChanged(activity);});
--
GitLab