always call the (virtual) contextMenuEvent

svn path=/trunk/KDE/kdelibs/; revision=1172750
This commit is contained in:
Aaron J. Seigo 2010-09-08 00:00:19 +00:00
parent 103eb8460c
commit 5ef4d99a6b

View File

@ -618,12 +618,18 @@ void Containment::showDropZone(const QPoint pos)
void Containment::showContextMenu(const QPointF &containmentPos, const QPoint &screenPos)
{
d->showContextMenu(mapToScene(containmentPos), screenPos, false, false);
//d->showContextMenu(mapToScene(containmentPos), screenPos, false, false);
QGraphicsSceneContextMenuEvent gvevent;
gvevent.setScreenPos(screenPos);
gvevent.setScenePos(mapToScene(containmentPos));
gvevent.setPos(containmentPos);
gvevent.setReason(QGraphicsSceneContextMenuEvent::Other);
gvevent.setWidget(view());
contextMenuEvent(&gvevent);
}
void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
{
//kDebug() << "let's see if we manage to get a context menu here, huh";
if (!isContainment() || !scene() || !KAuthorized::authorizeKAction("plasma/containment_context_menu")) {
Applet::contextMenuEvent(event);
return;
@ -2334,7 +2340,6 @@ void ContainmentPrivate::appletDestroyed(Plasma::Applet *applet)
}
if (handles.contains(applet)) {
AppletHandle *handle = handles.value(applet);
handles.remove(applet);
}