KMenu becomes QMenu throughout

This commit is contained in:
Sebastian Kügler 2013-07-09 00:55:03 +02:00
parent 4fffde0547
commit ca5c059ecf
3 changed files with 9 additions and 9 deletions

View File

@ -23,7 +23,7 @@
#include <QGraphicsSceneWheelEvent>
#include <KDebug>
#include <KMenu>
#include <QMenu>
#include <Plasma/Containment>
@ -60,7 +60,7 @@ void ContextTest::contextEvent(QGraphicsSceneMouseEvent *event)
return;
}
KMenu desktopMenu;
QMenu desktopMenu;
desktopMenu.addTitle(m_text);
desktopMenu.addAction(c->action("configure"));
desktopMenu.exec(event->screenPos());

View File

@ -207,7 +207,7 @@ void ContainmentInterface::mousePressEvent(QMouseEvent *event)
void ContainmentInterface::mouseReleaseEvent(QMouseEvent *event)
{
KMenu desktopMenu;
QMenu desktopMenu;
//FIXME: very inefficient appletAt() implementation
Plasma::Applet *applet = 0;
@ -234,7 +234,7 @@ void ContainmentInterface::mouseReleaseEvent(QMouseEvent *event)
void ContainmentInterface::addAppletActions(KMenu &desktopMenu, Plasma::Applet *applet, QEvent *event)
void ContainmentInterface::addAppletActions(QMenu &desktopMenu, Plasma::Applet *applet, QEvent *event)
{
foreach (QAction *action, applet->contextualActions()) {
if (action) {
@ -254,7 +254,7 @@ void ContainmentInterface::addAppletActions(KMenu &desktopMenu, Plasma::Applet *
}
}
KMenu *containmentMenu = new KMenu(i18nc("%1 is the name of the containment", "%1 Options", containment()->title()), &desktopMenu);
QMenu *containmentMenu = new QMenu(i18nc("%1 is the name of the containment", "%1 Options", containment()->title()), &desktopMenu);
addContainmentActions(*containmentMenu, event);
if (!containmentMenu->isEmpty()) {
@ -296,7 +296,7 @@ void ContainmentInterface::addAppletActions(KMenu &desktopMenu, Plasma::Applet *
}
}
void ContainmentInterface::addContainmentActions(KMenu &desktopMenu, QEvent *event)
void ContainmentInterface::addContainmentActions(QMenu &desktopMenu, QEvent *event)
{
if (containment()->corona()->immutability() != Plasma::Types::Mutable &&
!KAuthorized::authorizeKAction("plasma/containment_actions")) {

View File

@ -21,7 +21,7 @@
#ifndef CONTAINMENTINTERFACE_H
#define CONTAINMENTINTERFACE_H
#include <KMenu>
#include <QMenu>
#include <Plasma/Containment>
@ -74,8 +74,8 @@ protected:
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void addAppletActions(KMenu &desktopMenu, Plasma::Applet *applet, QEvent *event);
void addContainmentActions(KMenu &desktopMenu, QEvent *event);
void addAppletActions(QMenu &desktopMenu, Plasma::Applet *applet, QEvent *event);
void addContainmentActions(QMenu &desktopMenu, QEvent *event);
Q_SIGNALS:
void appletAdded(QObject *applet);