Replace QAction with KAction in containment

With this commit, plasma-framework is free from (direct) usage of
KAction. \o/

Removes any left-over KAction includes and fw-declarations.
This commit is contained in:
Sebastian Kügler 2013-07-10 01:59:39 +02:00
parent af46f93a57
commit 946a800a7a
6 changed files with 6 additions and 13 deletions

View File

@ -32,7 +32,6 @@
#include <QList>
#include <QUiLoader>
#include <kaction.h>
#include <kactioncollection.h>
#include <kcoreauthorized.h>
#include <kcolorscheme.h>

View File

@ -36,7 +36,6 @@
#include <qtemporaryfile.h>
#include <qmimedatabase.h>
#include <kaction.h>
#include <kdebug.h>
#include <kcoreauthorized.h>
#include <klocalizedstring.h>

View File

@ -31,7 +31,6 @@
#include <cmath>
//#include <kaction.h>
#include <kdebug.h>
#include <kiconloader.h>
#include <klocalizedstring.h>

View File

@ -28,8 +28,6 @@
class QAction;
class KAction;
namespace Plasma
{

View File

@ -25,7 +25,6 @@
#include <QAction>
#include <QBasicTimer>
//#include <KAction>
#include <kactioncollection.h>
#include <kconfigskeleton.h>
#include <kservice.h>

View File

@ -23,7 +23,6 @@
#include "private/containment_p.h"
#include <kaction.h>
#include <kactioncollection.h>
#include <kdebug.h>
#include <kiconloader.h>
@ -49,26 +48,26 @@ void ContainmentPrivate::addDefaultActions(KActionCollection *actions, Containme
actions->setConfigGroup("Shortcuts-Containment");
//adjust applet actions
KAction *appAction = qobject_cast<KAction*>(actions->action("remove"));
appAction->setShortcut(KShortcut("alt+d, alt+r"));
QAction *appAction = qobject_cast<QAction*>(actions->action("remove"));
appAction->setShortcut(QKeySequence("alt+d, alt+r"));
if (c && c->d->isPanelContainment()) {
appAction->setText(i18n("Remove this Panel"));
} else {
appAction->setText(i18n("Remove this Activity"));
}
appAction = qobject_cast<KAction*>(actions->action("configure"));
appAction = qobject_cast<QAction*>(actions->action("configure"));
if (appAction) {
appAction->setShortcut(KShortcut("alt+d, alt+s"));
appAction->setShortcut(QKeySequence("alt+d, alt+s"));
appAction->setText(i18n("Activity Settings"));
}
//add our own actions
KAction *appletBrowserAction = actions->add<KAction>("add widgets");
QAction *appletBrowserAction = actions->add<QAction>("add widgets");
appletBrowserAction->setAutoRepeat(false);
appletBrowserAction->setText(i18n("Add Widgets..."));
appletBrowserAction->setIcon(QIcon::fromTheme("list-add"));
appletBrowserAction->setShortcut(KShortcut("alt+d, a"));
appletBrowserAction->setShortcut(QKeySequence("alt+d, a"));
appletBrowserAction->setData(Plasma::Types::AddAction);
}