mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-16 02:47:36 +02:00
Try to avoid double records
This commit is contained in:
parent
ab3a0cbab8
commit
52e40b0016
@ -255,7 +255,11 @@ static QVariant getValue(QVariant input, QString path)
|
||||
QString remainder = "/" + path.section('/', 2, -1);
|
||||
|
||||
entryName.remove(0, 1);
|
||||
return getValue(input.toMap().value(entryName), remainder);
|
||||
QMap<QString, QString> keyNormalize;
|
||||
for(auto & key : input.toMap().keys())
|
||||
keyNormalize[key.toLower()] = key;
|
||||
|
||||
return getValue(input.toMap().value(keyNormalize[entryName]), remainder);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -265,6 +269,7 @@ static QVariant getValue(QVariant input, QString path)
|
||||
|
||||
CModEntry CModList::getMod(QString modname) const
|
||||
{
|
||||
modname = modname.toLower();
|
||||
QVariantMap repo;
|
||||
QVariantMap local = localModList[modname].toMap();
|
||||
QVariantMap settings;
|
||||
|
Loading…
Reference in New Issue
Block a user