File kcms_activities-Use-correct-method-to-set-active-global-shortcut.patch of Package plasma5-desktop.openSUSE_Leap_15.2_Update

From c5413826168497c361bb7122f9910b267e1e8e50 Mon Sep 17 00:00:00 2001
From: David Edmundson <kde@davidedmundson.co.uk>
Date: Fri, 25 Sep 2020 15:01:07 +0100
Subject: [PATCH] [kcms/activities] Use correct method to set active global
 shortcut

We're not binding to the action so we don't want setGlobalShortcut. We
also need to not autoload in order to actually save anything.

BUG: 374575
---
 kcms/activities/imports/dialog.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kcms/activities/imports/dialog.cpp b/kcms/activities/imports/dialog.cpp
index 91e5216c8..0ef4f0115 100644
--- a/kcms/activities/imports/dialog.cpp
+++ b/kcms/activities/imports/dialog.cpp
@@ -290,8 +290,7 @@ void Dialog::saveChanges(const QString &activityId)
     action.setProperty("isConfigurationAction", true);
     action.setProperty("componentName", QStringLiteral("ActivityManager"));
     action.setObjectName(QStringLiteral("switch-to-activity-") + activityId);
-    KGlobalAccel::self()->removeAllShortcuts(&action);
-    KGlobalAccel::self()->setGlobalShortcut(&action, activityShortcut());
+    KGlobalAccel::self()->setShortcut(&action, {activityShortcut()}, KGlobalAccel::NoAutoloading);
 
     // is private?
     d->features->SetValue(QStringLiteral("org.kde.ActivityManager.Resources.Scoring/isOTR/")
-- 
GitLab

openSUSE Build Service is sponsored by