Commit 2274ceb4 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

Expand $(VAR)-style environment variables

Task:	229217
parent 17a9f194
......@@ -1713,7 +1713,7 @@ bool ProFileEvaluator::Private::evaluateConditionalFunction(const QString &funct
ok = false;
break;
}
QString msg = args.first();
QString msg = fixEnvVariables(args.first());
if (function == QLatin1String("error")) {
QStringList parents;
foreach (ProFile *proFile, m_profileStack)
......@@ -2085,14 +2085,23 @@ bool ProFileEvaluator::contains(const QString &variableName) const
return d->m_valuemap.contains(variableName);
}
inline QStringList fixEnvVariables(const QStringList &x)
{
QStringList ret;
foreach (const QString &str, x)
ret << Option::fixString(str, Option::FixEnvVars);
return ret;
}
QStringList ProFileEvaluator::values(const QString &variableName) const
{
return d->values(variableName);
return fixEnvVariables(d->values(variableName));
}
QStringList ProFileEvaluator::values(const QString &variableName, const ProFile *pro) const
{
return d->values(variableName, pro);
return fixEnvVariables(d->values(variableName, pro));
}
ProFileEvaluator::TemplateType ProFileEvaluator::templateType()
......
......@@ -173,7 +173,12 @@ static QStringList replaceInList(const QStringList &varList, const QRegExp &rege
}
*/
inline QStringList splitPathList(const QString paths)
inline QString fixEnvVariables(const QString &x)
{
return Option::fixString(x, Option::FixEnvVars);
}
inline QStringList splitPathList(const QString &paths)
{
return paths.split(Option::dirlist_sep);
}
......
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