Commit f91a1f35 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas
Browse files

fix plugin deps check version. + handle version arg without patch level

parent ef63402e
......@@ -117,6 +117,10 @@ inline bool checkVersion(const QString ref_version, const QString elem_version)
if(ve_ref_list.at(1).toInt() < ve_elem_list.at(1).toInt())
return false;
else {
// no patch level specified in ref
if (ve_ref_list.size() < 3 || ve_elem_list.size() < 3) {
return true;
}
//if same minor level, compare patch level
if((ve_ref_list.at(1).toInt() == ve_elem_list.at(1).toInt()) &&
(ve_ref_list.at(2).toInt() < ve_elem_list.at(2).toInt()))
......
......@@ -87,7 +87,7 @@ template <typename T> bool dtkCorePluginManagerPrivate<T>::check(const QString&
continue;
}
if (checkVersion(ve_mitem.toString(), dtkCorePluginManagerBase::instance()->version(key).toString())) {
if (!checkVersion(dtkCorePluginManagerBase::instance()->version(key).toString(), ve_mitem.toString())) {
dtkWarn() << " Version mismatch:" << na_mitem.toString() << "version" << dtkCorePluginManagerBase::instance()->version(key).toString() << "but" << ve_mitem.toString() << "required for plugin" << path;
status = false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment