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(
|
||||
ProFile *pro, QMakeHandler::EvalFileType type, LoadFlags flags)
|
||||
{
|
||||
@@ -1319,24 +1341,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile(
|
||||
|
||||
evaluateFeatureFile(QLatin1String("default_post.prf"));
|
||||
|
||||
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;
|
||||
}
|
||||
evaluateConfigFeatures();
|
||||
}
|
||||
m_profileStack.pop();
|
||||
valuesRef(ProKey("PWD")) = ProStringList(ProString(currentDirectory()));
|
||||
|
@@ -159,6 +159,7 @@ public:
|
||||
bool evaluateFileInto(const QString &fileName,
|
||||
ProValueMap *values, // output-only
|
||||
LoadFlags flags);
|
||||
void evaluateConfigFeatures();
|
||||
void message(int type, const QString &msg) const;
|
||||
void evalError(const QString &msg) const
|
||||
{ message(QMakeHandler::EvalError, msg); }
|
||||
|
Reference in New Issue
Block a user