fix: use more robust method of finding matches for major version
This uses the proper version list to find all MC versions matching the
major number (_don't say anything about SemVer_ 🔫).
Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
1b0ca47682
commit
8a65726e9d
4 changed files with 45 additions and 4 deletions
|
@ -140,6 +140,13 @@ VersionPtr VersionList::getVersion(const QString &version)
|
|||
return out;
|
||||
}
|
||||
|
||||
bool VersionList::hasVersion(QString version) const
|
||||
{
|
||||
auto ver = std::find_if(m_versions.constBegin(), m_versions.constEnd(),
|
||||
[&](Meta::VersionPtr const& a){ return a->version() == version; });
|
||||
return (ver != m_versions.constEnd());
|
||||
}
|
||||
|
||||
void VersionList::setName(const QString &name)
|
||||
{
|
||||
m_name = name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue