mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
parent
af9f43efb0
commit
474d665e52
@ -18,6 +18,7 @@
|
||||
#include "enhancedmenu.h"
|
||||
|
||||
#include <QMouseEvent>
|
||||
#include <QApplication>
|
||||
|
||||
Menu::Menu(QWidget* parent)
|
||||
: QMenu(parent)
|
||||
@ -66,11 +67,11 @@ void Menu::mouseReleaseEvent(QMouseEvent* e)
|
||||
|
||||
void Menu::closeAllMenus()
|
||||
{
|
||||
QMenu* parentMenu = this;
|
||||
QMenu* menu = this;
|
||||
|
||||
while (parentMenu) {
|
||||
parentMenu->close();
|
||||
parentMenu = qobject_cast<QMenu*>(parentMenu->parentWidget());
|
||||
while (menu) {
|
||||
menu->close();
|
||||
menu = qobject_cast<QMenu*>(QApplication::activePopupWidget());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user