Commit bd2fab0a 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
parent 4e0c2655
......@@ -87,7 +87,7 @@ void GlobalShortcutsPlugin::activityAdded(const QString &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);});
Supports Markdown
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