forked from qt-creator/qt-creator
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:
@@ -547,6 +547,16 @@ void PluginSpec::setEnabledBySettings(bool value)
|
||||
d->setEnabledBySettings(value);
|
||||
}
|
||||
|
||||
PluginSpec *PluginSpec::read(const QString &filePath)
|
||||
{
|
||||
auto spec = new PluginSpec;
|
||||
if (!spec->d->read(filePath)) { // not a Qt Creator plugin
|
||||
delete spec;
|
||||
return nullptr;
|
||||
}
|
||||
return spec;
|
||||
}
|
||||
|
||||
//==========PluginSpecPrivate==================
|
||||
|
||||
namespace {
|
||||
|
||||
Reference in New Issue
Block a user