Commit e3eea3a9 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

factor out evaluateConfigFeatures()



Change-Id: Ida8e871f8a1bcb9598dc83874ed2db17083a7fd5
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 79fcd3f4
......@@ -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); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment