diff --git a/composite.cpp b/composite.cpp
index 16a0c91fe8..717c34b699 100644
--- a/composite.cpp
+++ b/composite.cpp
@@ -46,7 +46,6 @@ along with this program. If not, see .
#include
#include
#include
-#include
#include
#include
#include
diff --git a/useractions.cpp b/useractions.cpp
index a2cd020e0d..3beff723f0 100755
--- a/useractions.cpp
+++ b/useractions.cpp
@@ -72,7 +72,6 @@ along with this program. If not, see .
#include
#include
#include
-#include
#include "killwindow.h"
#ifdef KWIN_BUILD_TABBOX
@@ -1005,10 +1004,11 @@ void Workspace::setupWindowShortcutDone(bool ok)
void Workspace::clientShortcutUpdated(Client* c)
{
QString key = QStringLiteral("_k_session:%1").arg(c->window());
- QAction* action = client_keys->action(key);
+ QAction* action = findChild(key);
if (!c->shortcut().isEmpty()) {
if (action == NULL) { // new shortcut
- action = client_keys->addAction(QString(key));
+ action = new QAction(this);
+ action->setObjectName(key);
action->setText(i18n("Activate Window (%1)", c->caption()));
connect(action, SIGNAL(triggered(bool)), c, SLOT(shortcutActivated()));
}
diff --git a/workspace.cpp b/workspace.cpp
index 3975b63b9d..0b3c0b5bb0 100644
--- a/workspace.cpp
+++ b/workspace.cpp
@@ -61,7 +61,6 @@ along with this program. If not, see .
#include "xcbutils.h"
#include "main.h"
// KDE
-#include
#include
#include
#include
@@ -147,7 +146,6 @@ Workspace::Workspace(bool restore)
, session_saving(false)
, block_focus(0)
, m_userActionsMenu(new UserActionsMenu(this))
- , client_keys(NULL)
, client_keys_dialog(NULL)
, client_keys_client(NULL)
, global_shortcuts_disabled_for_client(false)
@@ -239,8 +237,6 @@ Workspace::Workspace(bool restore)
xcb_change_property(connection(), XCB_PROP_MODE_APPEND, rootWindow(), atoms->kwin_running,
atoms->kwin_running, 32, 1, &data);
- client_keys = new KActionCollection(this);
-
Outline::create(this);
initShortcuts();
diff --git a/workspace.h b/workspace.h
index 3ac8279034..81e0a83210 100644
--- a/workspace.h
+++ b/workspace.h
@@ -38,7 +38,6 @@ along with this program. If not, see .
class QStringList;
class KConfig;
class KConfigGroup;
-class KActionCollection;
class KStartupInfo;
class KStartupInfoId;
class KStartupInfoData;
@@ -191,10 +190,6 @@ public:
int oldDisplayWidth() const;
int oldDisplayHeight() const;
- KActionCollection* clientKeys() const {
- return client_keys;
- }
-
/**
* Returns the list of clients sorted in stacking order, with topmost client
* at the last position
@@ -504,7 +499,6 @@ private:
void modalActionsSwitch(bool enabled);
- KActionCollection* client_keys;
ShortcutDialog* client_keys_dialog;
Client* client_keys_client;
bool global_shortcuts_disabled_for_client;