Plugin install: Check if archive contains a usable plugin

Checks if there is a library file which is a Qt Creator plugin
that is compatible with the version of Qt Creator that is running.

Change-Id: Ic5284e3803c45b8e2ef0d30afccb1680fabf43f3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Eike Ziller
2020-06-23 14:11:29 +02:00
parent 5b4b09481a
commit d67ab36c6f
4 changed files with 114 additions and 13 deletions

View File

@@ -1559,11 +1559,9 @@ void PluginManagerPrivate::readPluginPaths()
pluginCategories.insert(QString(), QVector<PluginSpec *>());
for (const QString &pluginFile : pluginFiles(pluginPaths)) {
auto *spec = new PluginSpec;
if (!spec->d->read(pluginFile)) { // not a Qt Creator plugin
delete spec;
PluginSpec *spec = PluginSpec::read(pluginFile);
if (!spec) // not a Qt Creator plugin
continue;
}
// defaultDisabledPlugins and defaultEnabledPlugins from install settings
// is used to override the defaults read from the plugin spec