diff --git a/kwinbindings.cpp b/kwinbindings.cpp
index d103e044b1..af662ea89a 100644
--- a/kwinbindings.cpp
+++ b/kwinbindings.cpp
@@ -30,7 +30,8 @@ along with this program. If not, see .
#define DEF2( name, descr, key, fnSlot ) \
a = actionCollection->addAction( QStringLiteral(name) ); \
a->setText( i18n(descr) ); \
- qobject_cast( a )->setGlobalShortcut(KShortcut(key)); \
+ KGlobalAccel::self()->setDefaultShortcut(a, QList() << key); \
+ KGlobalAccel::self()->setShortcut(a, QList() << key); \
connect(a, SIGNAL(triggered(bool)), SLOT(fnSlot));
#define DEF( name, key, fnSlot ) \
@@ -39,7 +40,8 @@ along with this program. If not, see .
#define DEF3( name, key, fnSlot, value ) \
a = actionCollection->addAction( QStringLiteral(name).arg(value) ); \
a->setText( i18n(name, value) ); \
- qobject_cast( a )->setGlobalShortcut(KShortcut(key)); \
+ KGlobalAccel::self()->setDefaultShortcut(a, QList() << key); \
+ KGlobalAccel::self()->setShortcut(a, QList() << key); \
a->setData(value); \
connect(a, SIGNAL(triggered(bool)), SLOT(fnSlot));
diff --git a/useractions.cpp b/useractions.cpp
index 28b6b3d3a1..7b9d924ff6 100755
--- a/useractions.cpp
+++ b/useractions.cpp
@@ -57,10 +57,12 @@ along with this program. If not, see .
#include
#endif
#include
+#include
#include
#include
#include
+#include
#include
#include
#include