plasma: set the associated action of the shortcut editor

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-04-25 09:44:35 +03:00
parent d077f26ce5
commit 334ecceb27

View file

@ -1810,6 +1810,7 @@ void AppletPrivate::addGlobalShortcutsPage(KConfigDialog *dialog)
QObject::connect(shortcutEditor.data(), SIGNAL(keySequenceChanged(QKeySequence)), dialog, SLOT(settingsModified()));
}
shortcutEditor.data()->setAssociatedAction(activationAction);
shortcutEditor.data()->setKeySequence(q->globalShortcut());
layout->addWidget(shortcutEditor.data());
layout->addStretch();
@ -1839,14 +1840,14 @@ void AppletPrivate::configDialogFinished()
void AppletPrivate::updateShortcuts()
{
if (isContainment) {
//a horrible hack to avoid clobbering corona settings
//we pull them out, then read, then put them back
// a horrible hack to avoid clobbering corona settings - pull them out, then read, then
// put them back
QList<QString> names;
QList<QAction*> qactions;
names << "add sibling containment" << "configure shortcuts" << "lock widgets";
foreach (const QString &name, names) {
QAction *a = actions->action(name);
actions->takeAction(a); //FIXME this is stupid, KActionCollection needs a takeAction(QString) method
actions->takeAction(a);
qactions << a;
}