1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

Fixed closing bookmarks menu when menu toolbar is hidden.

closes #481
This commit is contained in:
nowrep 2012-07-27 18:51:24 +02:00
parent af9f43efb0
commit 474d665e52

View File

@ -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());
}
}