[ContainmentInterface] Don't try to popup empty QMenu

With KIOSK restrictions it can happen that a context menu would be empty.
In this case just a shadow would show up. Do nothing then.

REVIEW: 127947
This commit is contained in:
Kai Uwe Broulik 2016-05-18 19:41:25 +02:00
parent 6ad988cb3d
commit f1648148b9

View File

@ -966,6 +966,12 @@ void ContainmentInterface::mousePressEvent(QMouseEvent *event)
}
}
if (desktopMenu->isEmpty()) {
delete desktopMenu;
event->accept();
return;
}
desktopMenu->popup(pos);
event->setAccepted(true);
}