don't show empty context menus if that is what they are

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=722677
This commit is contained in:
Aaron J. Seigo 2007-10-07 21:53:20 +00:00
parent ae9727817f
commit b1273b15d2

View File

@ -223,6 +223,12 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
//FIXME: change this to show this only in debug mode (or not at all?)
// before final release
QList<QAction*> actions = contextActions();
if (actions.count() < 1) {
QGraphicsItem::contextMenuEvent(event);
return;
}
foreach(QAction* action, actions) {
desktopMenu.addAction(action);
}