forked from qt-creator/qt-creator
evaluateFile() => evaluateFileChecked(), evaluateFileDirect() => evaluateFile()
this is a more natural naming scheme Change-Id: I376b16d14924d6c816b4eeab5169f54890164388 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
@@ -1361,7 +1361,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditionalFunction(
|
|||||||
fn.detach();
|
fn.detach();
|
||||||
bool ok;
|
bool ok;
|
||||||
if (parseInto.isEmpty()) {
|
if (parseInto.isEmpty()) {
|
||||||
ok = evaluateFile(fn, QMakeHandler::EvalIncludeFile, LoadProOnly | flags);
|
ok = evaluateFileChecked(fn, QMakeHandler::EvalIncludeFile, LoadProOnly | flags);
|
||||||
} else {
|
} else {
|
||||||
ProValueMap symbols;
|
ProValueMap symbols;
|
||||||
if ((ok = evaluateFileInto(fn, &symbols, LoadAll | flags))) {
|
if ((ok = evaluateFileInto(fn, &symbols, LoadAll | flags))) {
|
||||||
|
@@ -1098,7 +1098,7 @@ bool QMakeEvaluator::loadSpecInternal()
|
|||||||
if (!evaluateFeatureFile(QLatin1String("spec_pre.prf")))
|
if (!evaluateFeatureFile(QLatin1String("spec_pre.prf")))
|
||||||
return false;
|
return false;
|
||||||
QString spec = m_qmakespec + QLatin1String("/qmake.conf");
|
QString spec = m_qmakespec + QLatin1String("/qmake.conf");
|
||||||
if (!evaluateFileDirect(spec, QMakeHandler::EvalConfigFile, LoadProOnly)) {
|
if (!evaluateFile(spec, QMakeHandler::EvalConfigFile, LoadProOnly)) {
|
||||||
evalError(fL1S("Could not read qmake configuration file %1.").arg(spec));
|
evalError(fL1S("Could not read qmake configuration file %1.").arg(spec));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1129,17 +1129,17 @@ bool QMakeEvaluator::loadSpec()
|
|||||||
QMakeEvaluator evaluator(m_option, m_parser, m_handler);
|
QMakeEvaluator evaluator(m_option, m_parser, m_handler);
|
||||||
if (!m_superfile.isEmpty()) {
|
if (!m_superfile.isEmpty()) {
|
||||||
valuesRef(ProKey("_QMAKE_SUPER_CACHE_")) << ProString(m_superfile);
|
valuesRef(ProKey("_QMAKE_SUPER_CACHE_")) << ProString(m_superfile);
|
||||||
if (!evaluator.evaluateFileDirect(m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly))
|
if (!evaluator.evaluateFile(m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!m_conffile.isEmpty()) {
|
if (!m_conffile.isEmpty()) {
|
||||||
valuesRef(ProKey("_QMAKE_CONF_")) << ProString(m_conffile);
|
valuesRef(ProKey("_QMAKE_CONF_")) << ProString(m_conffile);
|
||||||
if (!evaluator.evaluateFileDirect(m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly))
|
if (!evaluator.evaluateFile(m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!m_cachefile.isEmpty()) {
|
if (!m_cachefile.isEmpty()) {
|
||||||
valuesRef(ProKey("_QMAKE_CACHE_")) << ProString(m_cachefile);
|
valuesRef(ProKey("_QMAKE_CACHE_")) << ProString(m_cachefile);
|
||||||
if (!evaluator.evaluateFileDirect(m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly))
|
if (!evaluator.evaluateFile(m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (qmakespec.isEmpty()) {
|
if (qmakespec.isEmpty()) {
|
||||||
@@ -1170,18 +1170,18 @@ bool QMakeEvaluator::loadSpec()
|
|||||||
m_qmakespec = QDir::cleanPath(qmakespec);
|
m_qmakespec = QDir::cleanPath(qmakespec);
|
||||||
|
|
||||||
if (!m_superfile.isEmpty()
|
if (!m_superfile.isEmpty()
|
||||||
&& !evaluateFileDirect(m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly)) {
|
&& !evaluateFile(m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!loadSpecInternal())
|
if (!loadSpecInternal())
|
||||||
return false;
|
return false;
|
||||||
updateFeaturePaths(); // The spec extends the feature search path, so rebuild the cache.
|
updateFeaturePaths(); // The spec extends the feature search path, so rebuild the cache.
|
||||||
if (!m_conffile.isEmpty()
|
if (!m_conffile.isEmpty()
|
||||||
&& !evaluateFileDirect(m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly)) {
|
&& !evaluateFile(m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!m_cachefile.isEmpty()
|
if (!m_cachefile.isEmpty()
|
||||||
&& !evaluateFileDirect(m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly)) {
|
&& !evaluateFile(m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -1691,7 +1691,7 @@ ProString QMakeEvaluator::first(const ProKey &variableName) const
|
|||||||
return ProString();
|
return ProString();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QMakeEvaluator::evaluateFileDirect(
|
bool QMakeEvaluator::evaluateFile(
|
||||||
const QString &fileName, QMakeHandler::EvalFileType type, LoadFlags flags)
|
const QString &fileName, QMakeHandler::EvalFileType type, LoadFlags flags)
|
||||||
{
|
{
|
||||||
if (ProFile *pro = m_parser->parsedProFile(fileName, true)) {
|
if (ProFile *pro = m_parser->parsedProFile(fileName, true)) {
|
||||||
@@ -1715,7 +1715,7 @@ bool QMakeEvaluator::evaluateFileDirect(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QMakeEvaluator::evaluateFile(
|
bool QMakeEvaluator::evaluateFileChecked(
|
||||||
const QString &fileName, QMakeHandler::EvalFileType type, LoadFlags flags)
|
const QString &fileName, QMakeHandler::EvalFileType type, LoadFlags flags)
|
||||||
{
|
{
|
||||||
if (fileName.isEmpty())
|
if (fileName.isEmpty())
|
||||||
@@ -1728,7 +1728,7 @@ bool QMakeEvaluator::evaluateFile(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} while ((ref = ref->m_caller));
|
} while ((ref = ref->m_caller));
|
||||||
return evaluateFileDirect(fileName, type, flags);
|
return evaluateFile(fileName, type, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QMakeEvaluator::evaluateFeatureFile(const QString &fileName, bool silent)
|
bool QMakeEvaluator::evaluateFeatureFile(const QString &fileName, bool silent)
|
||||||
@@ -1780,7 +1780,7 @@ bool QMakeEvaluator::evaluateFeatureFile(const QString &fileName, bool silent)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The path is fully normalized already.
|
// The path is fully normalized already.
|
||||||
bool ok = evaluateFileDirect(fn, QMakeHandler::EvalFeatureFile, LoadProOnly);
|
bool ok = evaluateFile(fn, QMakeHandler::EvalFeatureFile, LoadProOnly);
|
||||||
|
|
||||||
#ifdef PROEVALUATOR_CUMULATIVE
|
#ifdef PROEVALUATOR_CUMULATIVE
|
||||||
m_cumulative = cumulative;
|
m_cumulative = cumulative;
|
||||||
@@ -1794,7 +1794,7 @@ bool QMakeEvaluator::evaluateFileInto(const QString &fileName, ProValueMap *valu
|
|||||||
visitor.m_caller = this;
|
visitor.m_caller = this;
|
||||||
visitor.m_outputDir = m_outputDir;
|
visitor.m_outputDir = m_outputDir;
|
||||||
visitor.m_featureRoots = m_featureRoots;
|
visitor.m_featureRoots = m_featureRoots;
|
||||||
if (!visitor.evaluateFile(fileName, QMakeHandler::EvalAuxFile, flags))
|
if (!visitor.evaluateFileChecked(fileName, QMakeHandler::EvalAuxFile, flags))
|
||||||
return false;
|
return false;
|
||||||
*values = visitor.m_valuemapStack.top();
|
*values = visitor.m_valuemapStack.top();
|
||||||
#ifdef PROEVALUATOR_FULL
|
#ifdef PROEVALUATOR_FULL
|
||||||
|
@@ -151,10 +151,10 @@ public:
|
|||||||
QString resolvePath(const QString &fileName) const
|
QString resolvePath(const QString &fileName) const
|
||||||
{ return ProFileEvaluatorInternal::IoUtils::resolvePath(currentDirectory(), fileName); }
|
{ return ProFileEvaluatorInternal::IoUtils::resolvePath(currentDirectory(), fileName); }
|
||||||
|
|
||||||
bool evaluateFileDirect(const QString &fileName, QMakeHandler::EvalFileType type,
|
|
||||||
LoadFlags flags);
|
|
||||||
bool evaluateFile(const QString &fileName, QMakeHandler::EvalFileType type,
|
bool evaluateFile(const QString &fileName, QMakeHandler::EvalFileType type,
|
||||||
LoadFlags flags);
|
LoadFlags flags);
|
||||||
|
bool evaluateFileChecked(const QString &fileName, QMakeHandler::EvalFileType type,
|
||||||
|
LoadFlags flags);
|
||||||
bool evaluateFeatureFile(const QString &fileName, bool silent = false);
|
bool evaluateFeatureFile(const QString &fileName, bool silent = false);
|
||||||
bool evaluateFileInto(const QString &fileName,
|
bool evaluateFileInto(const QString &fileName,
|
||||||
ProValueMap *values, // output-only
|
ProValueMap *values, // output-only
|
||||||
|
Reference in New Issue
Block a user