Commit 3bd3ef32 authored by David Edmundson's avatar David Edmundson
Browse files

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


(cherry picked from commit bd2fab0a)
parent 3de7b7b8
......@@ -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);});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment