kdeui: remove unused KShortcutsEditor::ActionType enums

were not even used in the old implementation

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-04-24 11:12:13 +03:00
parent cf229be24d
commit 378011afe8
2 changed files with 7 additions and 9 deletions

View file

@ -107,7 +107,9 @@ void KShortcutsEditor::importConfiguration(KConfigBase *config)
void KShortcutsEditor::exportConfiguration(KConfigBase *config) const void KShortcutsEditor::exportConfiguration(KConfigBase *config) const
{ {
Q_ASSERT(config); Q_ASSERT(config);
if (!config) return; if (!config) {
return;
}
if (d->actionTypes & KShortcutsEditor::GlobalAction) { if (d->actionTypes & KShortcutsEditor::GlobalAction) {
KConfigGroup group(config, "Global Shortcuts"); KConfigGroup group(config, "Global Shortcuts");

View file

@ -62,16 +62,12 @@ class KDEUI_EXPORT KShortcutsEditor : public QWidget
Q_OBJECT Q_OBJECT
public: public:
enum ActionType { enum ActionType {
/// Actions which are triggered by any keypress in a widget which has the action added to it /// Actions which are triggered by any keypress in a widget
WidgetAction = Qt::WidgetShortcut /*0*/, LocalAction = 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 the windowing system /// Actions which are triggered by any keypress in the windowing system
GlobalAction = 4, GlobalAction = 1,
/// All actions /// All actions
AllActions = 0xffffffff AllActions = (LocalAction | GlobalAction)
}; };
Q_DECLARE_FLAGS(ActionTypes, ActionType) Q_DECLARE_FLAGS(ActionTypes, ActionType)