forked from qt-creator/qt-creator
CMake: Simplify CMakeConfigItem::toBool() use
Change-Id: I60120a152174b7c3751b99ac92d31bdb9c3ab1d9 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -209,7 +209,7 @@ static CMakeConfig readCacheFile(const FilePath &cacheFile, QString &errorMessag
|
||||
const QJsonObject prop = v.toObject();
|
||||
auto nv = nameValue(prop);
|
||||
if (nv.first == "ADVANCED") {
|
||||
const auto boolValue = CMakeConfigItem::toBool(nv.second.toUtf8());
|
||||
const auto boolValue = CMakeConfigItem::toBool(nv.second);
|
||||
item.isAdvanced = boolValue.has_value() && boolValue.value();
|
||||
} else if (nv.first == "HELPSTRING") {
|
||||
item.documentation = nv.second.toUtf8();
|
||||
|
||||
Reference in New Issue
Block a user