forked from qt-creator/qt-creator
Lua: Implement lua pluginspec specific version check
Change-Id: I52c496c177c949056ff5e7a4ff7b903a028620b1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <extensionsystem/extensionsystemtr.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/appinfo.h>
|
||||
#include <utils/expected.h>
|
||||
|
||||
#include <QJsonDocument>
|
||||
@@ -76,6 +77,19 @@ ExtensionSystem::IPlugin *LuaPluginSpec::plugin() const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool LuaPluginSpec::provides(PluginSpec *spec, const PluginDependency &dependency) const
|
||||
{
|
||||
if (QString::compare(dependency.name, spec->name(), Qt::CaseInsensitive) != 0)
|
||||
return false;
|
||||
|
||||
// Since we first released the lua support with Qt Creator 14.0.0, but the internal version
|
||||
// number was still 13.0.82, we needed to special case this version.
|
||||
if (versionCompare(dependency.version, "14.0.0") <= 0)
|
||||
return true;
|
||||
|
||||
return (versionCompare(spec->version(), dependency.version) >= 0);
|
||||
}
|
||||
|
||||
// LuaPluginSpec::For internal use {}
|
||||
bool LuaPluginSpec::loadLibrary()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user