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:
@@ -393,7 +393,7 @@ QVariant ConfigModelTreeItem::data(int column, int role) const
|
||||
}
|
||||
case 1: {
|
||||
const QString value = currentValue();
|
||||
const auto boolValue = CMakeConfigItem::toBool(value.toUtf8());
|
||||
const auto boolValue = CMakeConfigItem::toBool(value);
|
||||
const bool isTrue = boolValue.has_value() && boolValue.value();
|
||||
|
||||
switch (role) {
|
||||
|
||||
Reference in New Issue
Block a user