ExtensionSystem: Refactor PluginSpec

Splits the functionality between plugin type specific and general.

Allows Plugins to be loaded after the first pass, e.g. for Lua scripted
plugins.

Change-Id: If2712817a672c49d554fdc308250cb06ca7eb3f8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Marcus Tillmanns
2024-01-25 12:21:48 +01:00
parent 1af555ad09
commit b39b192518
16 changed files with 678 additions and 681 deletions

View File

@@ -154,11 +154,11 @@ void checkContents(QPromise<ArchiveIssue> &promise, const FilePath &tempDir)
if (promise.isCanceled())
return;
it.next();
PluginSpec *spec = PluginSpec::read(it.filePath());
expected_str<PluginSpec *> spec = PluginSpecImpl::read(it.filePath());
if (spec) {
// Is a Qt Creator plugin. Let's see if we find a Core dependency and check the
// version
const QVector<PluginDependency> dependencies = spec->dependencies();
const QVector<PluginDependency> dependencies = (*spec)->dependencies();
const auto found = std::find_if(dependencies.constBegin(), dependencies.constEnd(),
[coreplugin](const PluginDependency &d) { return d.name == coreplugin->name(); });
if (found == dependencies.constEnd())