[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:
parent
6ad988cb3d
commit
f1648148b9
@ -966,6 +966,12 @@ void ContainmentInterface::mousePressEvent(QMouseEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
if (desktopMenu->isEmpty()) {
|
||||
delete desktopMenu;
|
||||
event->accept();
|
||||
return;
|
||||
}
|
||||
|
||||
desktopMenu->popup(pos);
|
||||
event->setAccepted(true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user