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:
parent
af46f93a57
commit
946a800a7a
@ -32,7 +32,6 @@
|
|||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QUiLoader>
|
#include <QUiLoader>
|
||||||
|
|
||||||
#include <kaction.h>
|
|
||||||
#include <kactioncollection.h>
|
#include <kactioncollection.h>
|
||||||
#include <kcoreauthorized.h>
|
#include <kcoreauthorized.h>
|
||||||
#include <kcolorscheme.h>
|
#include <kcolorscheme.h>
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
#include <qtemporaryfile.h>
|
#include <qtemporaryfile.h>
|
||||||
#include <qmimedatabase.h>
|
#include <qmimedatabase.h>
|
||||||
|
|
||||||
#include <kaction.h>
|
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
#include <kcoreauthorized.h>
|
#include <kcoreauthorized.h>
|
||||||
#include <klocalizedstring.h>
|
#include <klocalizedstring.h>
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
//#include <kaction.h>
|
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
#include <kiconloader.h>
|
#include <kiconloader.h>
|
||||||
#include <klocalizedstring.h>
|
#include <klocalizedstring.h>
|
||||||
|
@ -28,8 +28,6 @@
|
|||||||
|
|
||||||
class QAction;
|
class QAction;
|
||||||
|
|
||||||
class KAction;
|
|
||||||
|
|
||||||
namespace Plasma
|
namespace Plasma
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QBasicTimer>
|
#include <QBasicTimer>
|
||||||
|
|
||||||
//#include <KAction>
|
|
||||||
#include <kactioncollection.h>
|
#include <kactioncollection.h>
|
||||||
#include <kconfigskeleton.h>
|
#include <kconfigskeleton.h>
|
||||||
#include <kservice.h>
|
#include <kservice.h>
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include "private/containment_p.h"
|
#include "private/containment_p.h"
|
||||||
|
|
||||||
|
|
||||||
#include <kaction.h>
|
|
||||||
#include <kactioncollection.h>
|
#include <kactioncollection.h>
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
#include <kiconloader.h>
|
#include <kiconloader.h>
|
||||||
@ -49,26 +48,26 @@ void ContainmentPrivate::addDefaultActions(KActionCollection *actions, Containme
|
|||||||
actions->setConfigGroup("Shortcuts-Containment");
|
actions->setConfigGroup("Shortcuts-Containment");
|
||||||
|
|
||||||
//adjust applet actions
|
//adjust applet actions
|
||||||
KAction *appAction = qobject_cast<KAction*>(actions->action("remove"));
|
QAction *appAction = qobject_cast<QAction*>(actions->action("remove"));
|
||||||
appAction->setShortcut(KShortcut("alt+d, alt+r"));
|
appAction->setShortcut(QKeySequence("alt+d, alt+r"));
|
||||||
if (c && c->d->isPanelContainment()) {
|
if (c && c->d->isPanelContainment()) {
|
||||||
appAction->setText(i18n("Remove this Panel"));
|
appAction->setText(i18n("Remove this Panel"));
|
||||||
} else {
|
} else {
|
||||||
appAction->setText(i18n("Remove this Activity"));
|
appAction->setText(i18n("Remove this Activity"));
|
||||||
}
|
}
|
||||||
|
|
||||||
appAction = qobject_cast<KAction*>(actions->action("configure"));
|
appAction = qobject_cast<QAction*>(actions->action("configure"));
|
||||||
if (appAction) {
|
if (appAction) {
|
||||||
appAction->setShortcut(KShortcut("alt+d, alt+s"));
|
appAction->setShortcut(QKeySequence("alt+d, alt+s"));
|
||||||
appAction->setText(i18n("Activity Settings"));
|
appAction->setText(i18n("Activity Settings"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//add our own actions
|
//add our own actions
|
||||||
KAction *appletBrowserAction = actions->add<KAction>("add widgets");
|
QAction *appletBrowserAction = actions->add<QAction>("add widgets");
|
||||||
appletBrowserAction->setAutoRepeat(false);
|
appletBrowserAction->setAutoRepeat(false);
|
||||||
appletBrowserAction->setText(i18n("Add Widgets..."));
|
appletBrowserAction->setText(i18n("Add Widgets..."));
|
||||||
appletBrowserAction->setIcon(QIcon::fromTheme("list-add"));
|
appletBrowserAction->setIcon(QIcon::fromTheme("list-add"));
|
||||||
appletBrowserAction->setShortcut(KShortcut("alt+d, a"));
|
appletBrowserAction->setShortcut(QKeySequence("alt+d, a"));
|
||||||
appletBrowserAction->setData(Plasma::Types::AddAction);
|
appletBrowserAction->setData(Plasma::Types::AddAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user