forked from qt-creator/qt-creator
Meson: Fix reading of tool settings
We were accumulating copies of the auto-detected system ninja setting since the QVariantMap retrieved with toMap() was empty as it is a Store nowadays. Change-Id: Id983b5f1bf5ff18d6f43a71ebb406520e7655705 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -77,14 +77,14 @@ std::vector<MesonTools::Tool_t> ToolsSettingsAccessor::loadMesonTools()
|
|||||||
std::vector<MesonTools::Tool_t> result;
|
std::vector<MesonTools::Tool_t> result;
|
||||||
for (auto toolIndex = 0; toolIndex < entry_count; toolIndex++) {
|
for (auto toolIndex = 0; toolIndex < entry_count; toolIndex++) {
|
||||||
Key name = entryName(toolIndex);
|
Key name = entryName(toolIndex);
|
||||||
if (data.contains(name)) {
|
Store store = storeFromVariant(data[name]);
|
||||||
const auto map = data[name].toMap();
|
QString type = store.value(ToolsSettings::TOOL_TYPE_KEY).toString();
|
||||||
auto type = map.value(ToolsSettings::TOOL_TYPE_KEY, ToolsSettings::TOOL_TYPE_MESON);
|
if (type == ToolsSettings::TOOL_TYPE_NINJA)
|
||||||
if (type == ToolsSettings::TOOL_TYPE_NINJA)
|
result.emplace_back(fromVariantMap<NinjaWrapper *>(storeFromVariant(data[name])));
|
||||||
result.emplace_back(fromVariantMap<NinjaWrapper *>(storeFromVariant(data[name])));
|
else if (type == ToolsSettings::TOOL_TYPE_MESON)
|
||||||
else
|
result.emplace_back(fromVariantMap<MesonWrapper *>(storeFromVariant(data[name])));
|
||||||
result.emplace_back(fromVariantMap<MesonWrapper *>(storeFromVariant(data[name])));
|
else
|
||||||
}
|
QTC_CHECK(false);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user