Fix missing wizard after loading CompilerExplorer without restart

Wizards should be reloaded after plugins are loaded. They might either
add wizard paths, or wizards that check for plugins might be loaded even
though they were not loaded before.
Emit PluginManager::pluginsChanged when plugins are loaded at runtime
too, and connect that to clearing the list of wizard factories.

Change-Id: I79e0fb4991074cba592296620f1758136d60b378
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Eike Ziller
2023-11-16 14:53:44 +01:00
parent b60fd77fc1
commit 8116aaaab8
2 changed files with 4 additions and 0 deletions

View File

@@ -1411,6 +1411,7 @@ void PluginManagerPrivate::loadPluginsAtRuntime(const QSet<PluginSpec *> &plugin
spec->d->kill();
}
});
emit q->pluginsChanged();
}
/*!

View File

@@ -431,6 +431,9 @@ void IWizardFactory::initialize()
connect(resetAction, &QAction::triggered, &IWizardFactory::clearWizardFactories);
connect(ICore::instance(), &ICore::newItemDialogStateChanged, resetAction,
[resetAction] { resetAction->setEnabled(!ICore::isNewItemDialogRunning()); });
connect(ExtensionSystem::PluginManager::instance(),
&ExtensionSystem::PluginManager::pluginsChanged,
&IWizardFactory::clearWizardFactories);
s_inspectWizardAction = new QAction(Tr::tr("Inspect Wizard State"), ActionManager::instance());
ActionManager::registerAction(s_inspectWizardAction, "Wizard.Inspect");