Fix a bug in TA that caused boolean values not to be presented in the config tab

This commit is contained in:
2022-05-23 16:37:34 +02:00
parent e29ece34f3
commit ac78659229

View File

@@ -69,6 +69,10 @@ void McConfigModel::parseJson(const QString &jsonString)
{
entries.push_back({key, currentValue.toString()});
}
else if (currentValue.isBool())
{
entries.push_back({key, currentValue.toBool() ? "True" : "False"});
}
}
}
@@ -183,6 +187,10 @@ void MemSpecModel::parseJson(const QString &jsonString)
{
value = currentValue.toString();
}
else if (currentValue.isBool())
{
value = currentValue.toBool() ? "True" : "False";
}
std::unique_ptr<Node> node = std::unique_ptr<Node>(new Node({key, value}, parentNode.get()));
addNodes(obj[key].toObject(), node);