From 334ecceb27f64ae42cc8fa1d5fb4ea9c85aec1e9 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Thu, 25 Apr 2024 09:44:35 +0300 Subject: [PATCH] plasma: set the associated action of the shortcut editor Signed-off-by: Ivailo Monev --- plasma/applet.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plasma/applet.cpp b/plasma/applet.cpp index c9288590..e1dade81 100644 --- a/plasma/applet.cpp +++ b/plasma/applet.cpp @@ -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 names; QList 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; }