aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmakeprojectmanager/makefileparse.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2019-11-15 16:20:33 +0100
committerhjk <[email protected]>2019-12-03 12:08:52 +0000
commitce434ccb5d2d28452cd2906b547dbb5f2086801c (patch)
tree710b57254cc7aafe6ee22e98dacc21bf878fbdd9 /src/plugins/qmakeprojectmanager/makefileparse.cpp
parent3b9ce988651b53563fddbb3927d747f23b48b923 (diff)
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 <[email protected]>
Diffstat (limited to 'src/plugins/qmakeprojectmanager/makefileparse.cpp')
-rw-r--r--src/plugins/qmakeprojectmanager/makefileparse.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/qmakeprojectmanager/makefileparse.cpp b/src/plugins/qmakeprojectmanager/makefileparse.cpp
index d40ad62901e..7c10fabe656 100644
--- a/src/plugins/qmakeprojectmanager/makefileparse.cpp
+++ b/src/plugins/qmakeprojectmanager/makefileparse.cpp
@@ -38,10 +38,10 @@
using namespace QmakeProjectManager;
using namespace Internal;
+using namespace ProjectExplorer;
using Utils::FilePath;
using Utils::QtcProcess;
-using ProjectExplorer::BaseTriStateAspect;
using QtSupport::QtVersionManager;
using QtSupport::BaseQtVersion;
@@ -192,14 +192,14 @@ void MakeFileParse::parseAssignments(QList<QMakeAssignment> *assignments)
m_config.osType = QMakeStepConfig::NoOsType;
} else if (value == QLatin1String("qml_debug")) {
if (qa.op == QLatin1String("+="))
- m_config.linkQmlDebuggingQQ2 = BaseTriStateAspect::Value::Enabled;
+ m_config.linkQmlDebuggingQQ2 = TriState::Enabled;
else
- m_config.linkQmlDebuggingQQ2 = BaseTriStateAspect::Value::Disabled;
+ m_config.linkQmlDebuggingQQ2 = TriState::Disabled;
} else if (value == QLatin1String("qtquickcompiler")) {
if (qa.op == QLatin1String("+="))
- m_config.useQtQuickCompiler = BaseTriStateAspect::Value::Enabled;
+ m_config.useQtQuickCompiler = TriState::Enabled;
else
- m_config.useQtQuickCompiler = BaseTriStateAspect::Value::Disabled;
+ m_config.useQtQuickCompiler = TriState::Disabled;
} else if (value == QLatin1String("force_debug_info")) {
if (qa.op == QLatin1String("+="))
foundForceDebugInfo = true;
@@ -225,7 +225,7 @@ void MakeFileParse::parseAssignments(QList<QMakeAssignment> *assignments)
}
if (foundForceDebugInfo && foundSeparateDebugInfo) {
- m_config.separateDebugInfo = ProjectExplorer::BaseTriStateAspect::Value::Enabled;
+ m_config.separateDebugInfo = TriState::Enabled;
} else if (foundForceDebugInfo) {
// Found only force_debug_info, so readd it
QMakeAssignment newQA;
@@ -376,11 +376,11 @@ void MakeFileParse::parseCommandLine(const QString &command, const QString &proj
qCDebug(logging()) << " TargetArch" << m_config.archConfig;
qCDebug(logging()) << " OsType" << m_config.osType;
qCDebug(logging()) << " LinkQmlDebuggingQQ2"
- << (m_config.linkQmlDebuggingQQ2 == BaseTriStateAspect::Value::Enabled);
+ << (m_config.linkQmlDebuggingQQ2 == TriState::Enabled);
qCDebug(logging()) << " Qt Quick Compiler"
- << (m_config.useQtQuickCompiler == BaseTriStateAspect::Value::Enabled);
+ << (m_config.useQtQuickCompiler == TriState::Enabled);
qCDebug(logging()) << " Separate Debug Info"
- << (m_config.separateDebugInfo == BaseTriStateAspect::Value::Enabled);
+ << (m_config.separateDebugInfo == TriState::Enabled);
// Create command line of all unfiltered arguments
foreach (const QMakeAssignment &qa, assignments)
@@ -525,8 +525,8 @@ void QmakeProjectManagerPlugin::testMakefileParser()
const QMakeStepConfig qmsc = parser.config();
QCOMPARE(qmsc.archConfig, static_cast<QMakeStepConfig::TargetArchConfig>(archConfig));
QCOMPARE(qmsc.osType, static_cast<QMakeStepConfig::OsType>(osType));
- QCOMPARE(qmsc.linkQmlDebuggingQQ2 == BaseTriStateAspect::Value::Enabled, linkQmlDebuggingQQ2);
- QCOMPARE(qmsc.useQtQuickCompiler == BaseTriStateAspect::Value::Enabled, useQtQuickCompiler);
- QCOMPARE(qmsc.separateDebugInfo == BaseTriStateAspect::Value::Enabled, separateDebugInfo);
+ QCOMPARE(qmsc.linkQmlDebuggingQQ2 == TriState::Enabled, linkQmlDebuggingQQ2);
+ QCOMPARE(qmsc.useQtQuickCompiler == TriState::Enabled, useQtQuickCompiler);
+ QCOMPARE(qmsc.separateDebugInfo == TriState::Enabled, separateDebugInfo);
}
#endif