From 946a800a7a5ad5228b368a98b39a312c6a86ef15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Wed, 10 Jul 2013 01:59:39 +0200 Subject: [PATCH] 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. --- src/plasma/applet.cpp | 1 - src/plasma/containment.cpp | 1 - src/plasma/corona.cpp | 1 - src/plasma/corona.h | 2 -- src/plasma/private/applet_p.h | 1 - src/plasma/private/containment_p.cpp | 13 ++++++------- 6 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/plasma/applet.cpp b/src/plasma/applet.cpp index 8de0066dc..9bb4de8cb 100644 --- a/src/plasma/applet.cpp +++ b/src/plasma/applet.cpp @@ -32,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/src/plasma/containment.cpp b/src/plasma/containment.cpp index 8f0e90d38..2d21a41e2 100644 --- a/src/plasma/containment.cpp +++ b/src/plasma/containment.cpp @@ -36,7 +36,6 @@ #include #include -#include #include #include #include diff --git a/src/plasma/corona.cpp b/src/plasma/corona.cpp index de3194835..6b10b826e 100644 --- a/src/plasma/corona.cpp +++ b/src/plasma/corona.cpp @@ -31,7 +31,6 @@ #include -//#include #include #include #include diff --git a/src/plasma/corona.h b/src/plasma/corona.h index a1235e274..07625d6ca 100644 --- a/src/plasma/corona.h +++ b/src/plasma/corona.h @@ -28,8 +28,6 @@ class QAction; -class KAction; - namespace Plasma { diff --git a/src/plasma/private/applet_p.h b/src/plasma/private/applet_p.h index 1b3a2c5aa..ab3cf1795 100644 --- a/src/plasma/private/applet_p.h +++ b/src/plasma/private/applet_p.h @@ -25,7 +25,6 @@ #include #include -//#include #include #include #include diff --git a/src/plasma/private/containment_p.cpp b/src/plasma/private/containment_p.cpp index 207782692..47a8a4f1c 100644 --- a/src/plasma/private/containment_p.cpp +++ b/src/plasma/private/containment_p.cpp @@ -23,7 +23,6 @@ #include "private/containment_p.h" -#include #include #include #include @@ -49,26 +48,26 @@ void ContainmentPrivate::addDefaultActions(KActionCollection *actions, Containme actions->setConfigGroup("Shortcuts-Containment"); //adjust applet actions - KAction *appAction = qobject_cast(actions->action("remove")); - appAction->setShortcut(KShortcut("alt+d, alt+r")); + QAction *appAction = qobject_cast(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(actions->action("configure")); + appAction = qobject_cast(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("add widgets"); + QAction *appletBrowserAction = actions->add("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); }