ProjectExplorer: Fix unrelated tooltip appearing

... on clicking into the locator widget.
This removes a workaround for a different problem which is much less
visible. Real solution to be implemented later.
Amends 4c1b3c863c.

Change-Id: I7e7902c90367c8ed59af4e5aabaf5514207b00de
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2022-12-09 11:10:48 +01:00
parent 112835922a
commit cd12930953

View File

@@ -1346,6 +1346,9 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
generatorContainer->setOnAllDisabledBehavior(ActionContainer::Show);
generatorContainer->menu()->setTitle(tr("Run Generator"));
mbuild->addMenu(generatorContainer, Constants::G_BUILD_BUILD);
// FIXME: This menu will never become visible if the user tried to open it once
// without a project loaded.
connect(generatorContainer->menu(), &QMenu::aboutToShow, [menu = generatorContainer->menu()] {
menu->clear();
if (Project * const project = SessionManager::startupProject()) {
@@ -1353,7 +1356,6 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
menu->addAction(generator.second, [project, id = generator.first] {
project->runGenerator(id);
});
menu->show();
}
}
});