From 9c2e4991cfc44a43ef21536e768cca0ae00712c8 Mon Sep 17 00:00:00 2001 From: Reza Shah Date: Wed, 28 Aug 2013 19:27:09 +0900 Subject: [PATCH] Port kwinbindings.cpp away from KAction/KShortcut REVIEW: 112119 --- kwinbindings.cpp | 6 ++++-- useractions.cpp | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) 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