default cumulative mode to off

this is clearly more often used and thus makes for cleaner code

Change-Id: Ic8d100cbfc4134f1b73117b4f4a5aa5a6f4e0ccb
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Oswald Buddenhagen
2012-06-18 10:03:45 +02:00
parent fe68b3dc6e
commit 55dfc27c52
5 changed files with 3 additions and 15 deletions

View File

@@ -1681,9 +1681,9 @@ void Qt4ProFileNode::setupReader()
Q_ASSERT(!m_readerCumulative); Q_ASSERT(!m_readerCumulative);
m_readerExact = m_project->createProFileReader(this); m_readerExact = m_project->createProFileReader(this);
m_readerExact->setCumulative(false);
m_readerCumulative = m_project->createProFileReader(this); m_readerCumulative = m_project->createProFileReader(this);
m_readerCumulative->setCumulative(true);
} }
Qt4ProFileNode::EvalResult Qt4ProFileNode::evaluate() Qt4ProFileNode::EvalResult Qt4ProFileNode::evaluate()

View File

@@ -726,7 +726,6 @@ void BaseQtVersion::ensureMkSpecParsed() const
QMakeParser parser(ProFileCacheManager::instance()->cache(), &msgHandler); QMakeParser parser(ProFileCacheManager::instance()->cache(), &msgHandler);
ProFileEvaluator evaluator(&option, &parser, &msgHandler); ProFileEvaluator evaluator(&option, &parser, &msgHandler);
if (ProFile *pro = parser.parsedProFile(mkspecPath().toString() + QLatin1String("/qmake.conf"))) { if (ProFile *pro = parser.parsedProFile(mkspecPath().toString() + QLatin1String("/qmake.conf"))) {
evaluator.setCumulative(false);
evaluator.accept(pro, QMakeEvaluator::LoadProOnly); evaluator.accept(pro, QMakeEvaluator::LoadProOnly);
pro->deref(); pro->deref();
} }

View File

@@ -83,7 +83,6 @@ BaseQtVersion *QtVersionFactory::createQtVersionFromQMakePath(const Utils::FileN
QMakeParser parser(ProFileCacheManager::instance()->cache(), &msgHandler); QMakeParser parser(ProFileCacheManager::instance()->cache(), &msgHandler);
ProFileEvaluator evaluator(&globals, &parser, &msgHandler); ProFileEvaluator evaluator(&globals, &parser, &msgHandler);
if (ProFile *pro = parser.parsedProFile(mkspec.toString() + QLatin1String("/qmake.conf"))) { if (ProFile *pro = parser.parsedProFile(mkspec.toString() + QLatin1String("/qmake.conf"))) {
evaluator.setCumulative(false);
evaluator.accept(pro, QMakeEvaluator::LoadProOnly); evaluator.accept(pro, QMakeEvaluator::LoadProOnly);
pro->deref(); pro->deref();
} }

View File

@@ -67,7 +67,7 @@ public:
ProFileEvaluator::TemplateType templateType() const; ProFileEvaluator::TemplateType templateType() const;
#ifdef PROEVALUATOR_CUMULATIVE #ifdef PROEVALUATOR_CUMULATIVE
void setCumulative(bool on); // Default is true! void setCumulative(bool on); // Default is false
#endif #endif
void setOutputDir(const QString &dir); // Default is empty void setOutputDir(const QString &dir); // Default is empty

View File

@@ -140,7 +140,7 @@ QMakeEvaluator::QMakeEvaluator(QMakeGlobals *option,
// Configuration, more or less // Configuration, more or less
#ifdef PROEVALUATOR_CUMULATIVE #ifdef PROEVALUATOR_CUMULATIVE
m_cumulative = true; m_cumulative = false;
#endif #endif
// Evaluator state // Evaluator state
@@ -924,9 +924,6 @@ bool QMakeEvaluator::prepareProject()
} }
if (!qmake_cache.isEmpty()) { if (!qmake_cache.isEmpty()) {
QMakeEvaluator evaluator(m_option, m_parser, m_handler); QMakeEvaluator evaluator(m_option, m_parser, m_handler);
#ifdef PROEVALUATOR_CUMULATIVE
evaluator.m_cumulative = false;
#endif
if (!evaluator.evaluateFileDirect(qmake_cache, QMakeHandler::EvalConfigFile, LoadProOnly)) if (!evaluator.evaluateFileDirect(qmake_cache, QMakeHandler::EvalConfigFile, LoadProOnly))
return false; return false;
if (m_option->qmakespec.isEmpty()) if (m_option->qmakespec.isEmpty())
@@ -940,10 +937,6 @@ bool QMakeEvaluator::prepareProject()
bool QMakeEvaluator::loadSpec() bool QMakeEvaluator::loadSpec()
{ {
#ifdef PROEVALUATOR_CUMULATIVE
m_cumulative = false;
#endif
loadDefaults(); loadDefaults();
QString qmakespec = m_option->expandEnvVars(m_option->qmakespec); QString qmakespec = m_option->expandEnvVars(m_option->qmakespec);
@@ -1828,9 +1821,6 @@ bool QMakeEvaluator::evaluateFileInto(
ProValueMap *values, EvalIntoMode mode) ProValueMap *values, EvalIntoMode mode)
{ {
QMakeEvaluator visitor(m_option, m_parser, m_handler); QMakeEvaluator visitor(m_option, m_parser, m_handler);
#ifdef PROEVALUATOR_CUMULATIVE
visitor.m_cumulative = false;
#endif
visitor.m_outputDir = m_outputDir; visitor.m_outputDir = m_outputDir;
if (!visitor.evaluateFile(fileName, type, if (!visitor.evaluateFile(fileName, type,
(mode == EvalWithSetup) ? LoadAll : LoadProOnly)) (mode == EvalWithSetup) ? LoadAll : LoadProOnly))