ProjectExplorer: Use full class for TriState value

Allows more compact code on the user side in most cases and
can hide the internal 'int-ness' from user code by wrapping
Variant conversions in the TriState class itself.

Change-Id: I4c91e0cd798ee988a0b9cb057749251a4efebaff
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-11-15 16:20:33 +01:00
parent 3b9ce98865
commit ce434ccb5d
14 changed files with 151 additions and 162 deletions

View File

@@ -837,19 +837,19 @@ QStringList QMakeStepConfig::toArguments() const
else if (osType == IphoneOS)
arguments << "CONFIG+=iphoneos" << "CONFIG+=device" /*since Qt 5.7*/;
if (linkQmlDebuggingQQ2 == BaseTriStateAspect::Value::Enabled)
if (linkQmlDebuggingQQ2 == TriState::Enabled)
arguments << "CONFIG+=qml_debug";
else if (linkQmlDebuggingQQ2 == BaseTriStateAspect::Value::Disabled)
else if (linkQmlDebuggingQQ2 == TriState::Disabled)
arguments << "CONFIG-=qml_debug";
if (useQtQuickCompiler == BaseTriStateAspect::Value::Enabled)
if (useQtQuickCompiler == TriState::Enabled)
arguments << "CONFIG+=qtquickcompiler";
else if (useQtQuickCompiler == BaseTriStateAspect::Value::Disabled)
else if (useQtQuickCompiler == TriState::Disabled)
arguments << "CONFIG-=qtquickcompiler";
if (separateDebugInfo == BaseTriStateAspect::Value::Enabled)
if (separateDebugInfo == TriState::Enabled)
arguments << "CONFIG+=force_debug_info" << "CONFIG+=separate_debug_info";
else if (separateDebugInfo == BaseTriStateAspect::Value::Disabled)
else if (separateDebugInfo == TriState::Disabled)
arguments << "CONFIG-=separate_debug_info";
if (!sysRoot.isEmpty()) {