From 05836ea6fd9c2df12748d3de9489b35583bc5c85 Mon Sep 17 00:00:00 2001 From: Javier Date: Sat, 14 Feb 2015 18:25:48 +0100 Subject: remove contained actions when removing a menu from the proxy --- module/menuproxy.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'module/menuproxy.cc') diff --git a/module/menuproxy.cc b/module/menuproxy.cc index 01a2b6f..d2a757d 100644 --- a/module/menuproxy.cc +++ b/module/menuproxy.cc @@ -202,6 +202,11 @@ void MenuProxy::removeMenu(QMenu *menu) GtkMenu *g_parent = GTK_MENU(gtk_widget_get_parent(g_item)); Q_ASSERT(g_parent); + // Does it contain any actions? Should remove those now + foreach (QAction *action, menu->actions()) { + removeAction(action); + } + menu->removeEventFilter(this); gtk_widget_destroy(GTK_WIDGET(g_menu)); -- cgit v1.2.3