kcms/tabbox: Fix Reset not disabling Apply

Fix the code to get the actual saved shortcuts on KGlobalAccel
when discerning if they have changed.

Amends commit: 76ac4be316
This commit is contained in:
Ismael Asensio 2023-01-12 22:29:42 +01:00 committed by Vlad Zahorodnii
parent c9691b5855
commit fdd585e44c

View file

@ -276,7 +276,7 @@ bool KWinTabBoxConfigForm::isShortcutsChanged() const
for (const auto &widget : {ui->scAll, ui->scAllReverse, ui->scCurrent, ui->scCurrentReverse}) {
const QString actionName = widget->property("shortcutAction").toString();
QAction *action = m_actionCollection->action(actionName);
const auto shortcuts = KGlobalAccel::self()->shortcut(action);
const auto shortcuts = KGlobalAccel::self()->globalShortcut(QStringLiteral("kwin"), actionName);
const QKeySequence savedShortcut = shortcuts.isEmpty() ? QKeySequence() : shortcuts.first();
if (action->shortcut() != savedShortcut) {