Commit 87fbe16f authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

add QMakeEvaluator::first()



this is a convenience variant of values()

Change-Id: If8e15b46a88c00cef3435b73cf6280ab5f48c062
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 251ed0e8
......@@ -1924,6 +1924,14 @@ ProStringList QMakeEvaluator::values(const ProString &variableName) const
return result;
}
ProString QMakeEvaluator::first(const ProString &variableName) const
{
const ProStringList &vals = values(variableName);
if (!vals.isEmpty())
return vals.first();
return ProString();
}
bool QMakeEvaluator::evaluateFileDirect(
const QString &fileName, QMakeEvaluatorHandler::EvalFileType type, LoadFlags flags)
{
......
......@@ -80,6 +80,7 @@ public:
ProStringList values(const ProString &variableName) const;
ProStringList &valuesRef(const ProString &variableName);
ProString first(const ProString &variableName) const;
QString propertyValue(const QString &val, bool complain) const;
enum VisitReturn {
......
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