diff --git a/globalshortcuts.h b/globalshortcuts.h --- a/globalshortcuts.h +++ b/globalshortcuts.h @@ -53,13 +53,6 @@ void init(); /** - * @brief Registers an internal global shortcut - * - * @param action The action to trigger if the shortcut is pressed - * @param shortcut The key sequence which triggers this shortcut - */ - void registerShortcut(QAction *action, const QKeySequence &shortcut); - /** * @brief Registers an internal global pointer shortcut * * @param action The action to trigger if the shortcut is pressed @@ -110,7 +103,6 @@ private: void objectDeleted(QObject *object); QKeySequence getShortcutForAction(const QString &componentName, const QString &actionName, const QKeySequence &defaultShortcut); - QHash > m_shortcuts; QHash > m_pointerShortcuts; QHash > m_axisShortcuts; KSharedConfigPtr m_config; diff --git a/globalshortcuts.cpp b/globalshortcuts.cpp --- a/globalshortcuts.cpp +++ b/globalshortcuts.cpp @@ -107,7 +107,6 @@ GlobalShortcutsManager::~GlobalShortcutsManager() { - clearShortcuts(m_shortcuts); clearShortcuts(m_pointerShortcuts); clearShortcuts(m_axisShortcuts); } @@ -148,7 +147,6 @@ void GlobalShortcutsManager::objectDeleted(QObject *object) { - handleDestroyedAction(object, m_shortcuts); handleDestroyedAction(object, m_pointerShortcuts); handleDestroyedAction(object, m_axisShortcuts); } @@ -168,35 +166,6 @@ } } -void GlobalShortcutsManager::registerShortcut(QAction *action, const QKeySequence &shortcut) -{ - QKeySequence s = getShortcutForAction(KWIN_NAME, action->objectName(), shortcut); - if (s.isEmpty()) { - // TODO: insert into a list of empty shortcuts to react on changes - return; - } - int keys = s[0]; - Qt::KeyboardModifiers mods = Qt::NoModifier; - if (keys & Qt::ShiftModifier) { - mods |= Qt::ShiftModifier; - } - if (keys & Qt::ControlModifier) { - mods |= Qt::ControlModifier; - } - if (keys & Qt::AltModifier) { - mods |= Qt::AltModifier; - } - if (keys & Qt::MetaModifier) { - mods |= Qt::MetaModifier; - } - int keysym = 0; - if (!KKeyServer::keyQtToSymX(keys, &keysym)) { - return; - } - addShortcut(m_shortcuts, action, mods, static_cast(keysym)); - connect(action, &QAction::destroyed, this, &GlobalShortcutsManager::objectDeleted); -} - void GlobalShortcutsManager::registerPointerShortcut(QAction *action, Qt::KeyboardModifiers modifiers, Qt::MouseButtons pointerButtons) { addShortcut(m_pointerShortcuts, action, modifiers, pointerButtons); @@ -274,9 +243,6 @@ } } } - if (processShortcut(mods, key, m_shortcuts)) { - return true; - } return false; } diff --git a/input.cpp b/input.cpp --- a/input.cpp +++ b/input.cpp @@ -1806,7 +1806,6 @@ void InputRedirection::registerShortcut(const QKeySequence &shortcut, QAction *action) { - m_shortcuts->registerShortcut(action, shortcut); registerShortcutForGlobalAccelTimestamp(action); }