1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-25 21:38:59 +02:00

Merge pull request #995 from Nordsoft91/hotfix/mods-deps

Hotfix for mods dependencies
This commit is contained in:
Andrii Danylchenko 2022-09-26 09:14:18 +03:00 committed by GitHub
commit 6ad468ecd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,6 +206,8 @@ void CModList::resetRepositories()
void CModList::addRepository(QVariantMap data)
{
for(auto & key : data.keys())
data[key.toLower()] = data.take(key);
repositories.push_back(copyField(data, "version", "latestVersion"));
}
@ -231,11 +233,7 @@ static QVariant getValue(QVariant input, QString path)
QString remainder = "/" + path.section('/', 2, -1);
entryName.remove(0, 1);
QMap<QString, QString> keyNormalize;
for(auto & key : input.toMap().keys())
keyNormalize[key.toLower()] = key;
return getValue(input.toMap().value(keyNormalize[entryName]), remainder);
return getValue(input.toMap().value(entryName), remainder);
}
else
{