From 378011afe801ec37e3a9017aee6f77799b5a284e Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Wed, 24 Apr 2024 11:12:13 +0300 Subject: [PATCH] kdeui: remove unused KShortcutsEditor::ActionType enums were not even used in the old implementation Signed-off-by: Ivailo Monev --- kdeui/dialogs/kshortcutseditor.cpp | 4 +++- kdeui/dialogs/kshortcutseditor.h | 12 ++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/kdeui/dialogs/kshortcutseditor.cpp b/kdeui/dialogs/kshortcutseditor.cpp index fed759ac..a660925a 100644 --- a/kdeui/dialogs/kshortcutseditor.cpp +++ b/kdeui/dialogs/kshortcutseditor.cpp @@ -107,7 +107,9 @@ void KShortcutsEditor::importConfiguration(KConfigBase *config) void KShortcutsEditor::exportConfiguration(KConfigBase *config) const { Q_ASSERT(config); - if (!config) return; + if (!config) { + return; + } if (d->actionTypes & KShortcutsEditor::GlobalAction) { KConfigGroup group(config, "Global Shortcuts"); diff --git a/kdeui/dialogs/kshortcutseditor.h b/kdeui/dialogs/kshortcutseditor.h index 0853bca2..0b23186a 100644 --- a/kdeui/dialogs/kshortcutseditor.h +++ b/kdeui/dialogs/kshortcutseditor.h @@ -62,16 +62,12 @@ class KDEUI_EXPORT KShortcutsEditor : public QWidget Q_OBJECT public: enum ActionType { - /// Actions which are triggered by any keypress in a widget which has the action added to it - WidgetAction = Qt::WidgetShortcut /*0*/, - /// Actions which are triggered by any keypress in a window which has the action added to it or its child widget(s) - WindowAction = Qt::WindowShortcut /*1*/, - /// Actions which are triggered by any keypress in the application - ApplicationAction = Qt::ApplicationShortcut /*2*/, + /// Actions which are triggered by any keypress in a widget + LocalAction = 0, /// Actions which are triggered by any keypress in the windowing system - GlobalAction = 4, + GlobalAction = 1, /// All actions - AllActions = 0xffffffff + AllActions = (LocalAction | GlobalAction) }; Q_DECLARE_FLAGS(ActionTypes, ActionType)