diff --git a/src/plugins/TabManager/tabmanagerplugin.cpp b/src/plugins/TabManager/tabmanagerplugin.cpp index f8e363687..f6565f94d 100644 --- a/src/plugins/TabManager/tabmanagerplugin.cpp +++ b/src/plugins/TabManager/tabmanagerplugin.cpp @@ -116,7 +116,6 @@ void TabManagerPlugin::populateExtensionsMenu(QMenu* menu) { if (viewType() == ShowAsWindow) { QAction* showAction = m_controller->createMenuAction(); - showAction->setParent(menu); showAction->setCheckable(false); connect(showAction, SIGNAL(triggered()), m_controller, SLOT(raiseTabManager())); menu->addAction(showAction); diff --git a/src/plugins/TabManager/tabmanagerwidgetcontroller.cpp b/src/plugins/TabManager/tabmanagerwidgetcontroller.cpp index 994eaff5b..a27346256 100644 --- a/src/plugins/TabManager/tabmanagerwidgetcontroller.cpp +++ b/src/plugins/TabManager/tabmanagerwidgetcontroller.cpp @@ -48,7 +48,7 @@ QString TabManagerWidgetController::title() const QAction* TabManagerWidgetController::createMenuAction() { - QAction* act = new QAction(tr("Tab Manager"), 0); + QAction* act = new QAction(tr("Tab Manager"), this); act->setCheckable(true); act->setIcon(QIcon(":tabmanager/data/tabmanager.png")); act->setShortcut(QKeySequence("Ctrl+Shift+M")); diff --git a/src/plugins/TestPlugin/testplugin_sidebar.cpp b/src/plugins/TestPlugin/testplugin_sidebar.cpp index d9896f597..1bc224360 100644 --- a/src/plugins/TestPlugin/testplugin_sidebar.cpp +++ b/src/plugins/TestPlugin/testplugin_sidebar.cpp @@ -34,7 +34,10 @@ QString TestPlugin_Sidebar::title() const QAction* TestPlugin_Sidebar::createMenuAction() { - QAction* act = new QAction(tr("Testing Sidebar"), 0); + // The action must be parented to some object from plugin, otherwise + // there may be a crash when unloading the plugin. + + QAction* act = new QAction(tr("Testing Sidebar"), this); act->setCheckable(true); return act;