diff options
author | Javier <dev.git@javispedro.com> | 2015-02-14 18:25:48 +0100 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-02-14 18:25:48 +0100 |
commit | 05836ea6fd9c2df12748d3de9489b35583bc5c85 (patch) | |
tree | 1b014a0d20f15bda357b66678ddf1cfcc0927128 | |
parent | a88a02bde7401c566ee79f95b5ea7e9011332ffd (diff) | |
download | topmenu-qt-05836ea6fd9c2df12748d3de9489b35583bc5c85.tar.gz topmenu-qt-05836ea6fd9c2df12748d3de9489b35583bc5c85.zip |
remove contained actions when removing a menu from the proxy
-rw-r--r-- | module/menuproxy.cc | 5 |
1 files changed, 5 insertions, 0 deletions
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)); |