forked from qt-creator/qt-creator
factor out evaluateConfigFeatures()
Change-Id: Ida8e871f8a1bcb9598dc83874ed2db17083a7fd5 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -1211,6 +1211,28 @@ void QMakeEvaluator::evaluateCommand(const QString &cmds, const QString &where)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QMakeEvaluator::evaluateConfigFeatures()
|
||||||
|
{
|
||||||
|
QSet<QString> processed;
|
||||||
|
forever {
|
||||||
|
bool finished = true;
|
||||||
|
ProStringList configs = values(statics.strCONFIG);
|
||||||
|
for (int i = configs.size() - 1; i >= 0; --i) {
|
||||||
|
QString config = configs.at(i).toQString(m_tmp1).toLower();
|
||||||
|
if (!processed.contains(config)) {
|
||||||
|
config.detach();
|
||||||
|
processed.insert(config);
|
||||||
|
if (evaluateFeatureFile(config, true)) {
|
||||||
|
finished = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (finished)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile(
|
QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile(
|
||||||
ProFile *pro, QMakeHandler::EvalFileType type, LoadFlags flags)
|
ProFile *pro, QMakeHandler::EvalFileType type, LoadFlags flags)
|
||||||
{
|
{
|
||||||
@@ -1319,24 +1341,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile(
|
|||||||
|
|
||||||
evaluateFeatureFile(QLatin1String("default_post.prf"));
|
evaluateFeatureFile(QLatin1String("default_post.prf"));
|
||||||
|
|
||||||
QSet<QString> processed;
|
evaluateConfigFeatures();
|
||||||
forever {
|
|
||||||
bool finished = true;
|
|
||||||
ProStringList configs = values(statics.strCONFIG);
|
|
||||||
for (int i = configs.size() - 1; i >= 0; --i) {
|
|
||||||
QString config = configs.at(i).toQString(m_tmp1).toLower();
|
|
||||||
if (!processed.contains(config)) {
|
|
||||||
config.detach();
|
|
||||||
processed.insert(config);
|
|
||||||
if (evaluateFeatureFile(config, true)) {
|
|
||||||
finished = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (finished)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
m_profileStack.pop();
|
m_profileStack.pop();
|
||||||
valuesRef(ProKey("PWD")) = ProStringList(ProString(currentDirectory()));
|
valuesRef(ProKey("PWD")) = ProStringList(ProString(currentDirectory()));
|
||||||
|
@@ -159,6 +159,7 @@ public:
|
|||||||
bool evaluateFileInto(const QString &fileName,
|
bool evaluateFileInto(const QString &fileName,
|
||||||
ProValueMap *values, // output-only
|
ProValueMap *values, // output-only
|
||||||
LoadFlags flags);
|
LoadFlags flags);
|
||||||
|
void evaluateConfigFeatures();
|
||||||
void message(int type, const QString &msg) const;
|
void message(int type, const QString &msg) const;
|
||||||
void evalError(const QString &msg) const
|
void evalError(const QString &msg) const
|
||||||
{ message(QMakeHandler::EvalError, msg); }
|
{ message(QMakeHandler::EvalError, msg); }
|
||||||
|
Reference in New Issue
Block a user