summaryrefslogtreecommitdiffstats
path: root/qmake/project.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-03-23 12:31:48 +0100
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-04-12 11:58:37 +0200
commit3838388e8143ac5f5e1f3688f9ba31190fd9bbd3 (patch)
tree5be42ece1ad50ce480a7a84b16811f85aca46566 /qmake/project.cpp
parentc4dd5b7eb3b8a212d2f80bbca2a2713a57cf1247 (diff)
useful location reporting for errors from QMAKE_SUBSTITUTES
Reviewed-by: mariusSO
Diffstat (limited to 'qmake/project.cpp')
-rw-r--r--qmake/project.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 16200f14e5..d4f21bebd7 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -2773,6 +2773,20 @@ QMakeProject::expand(const QString &str)
return QStringList();
}
+QString
+QMakeProject::expand(const QString &str, const QString &file, int line)
+{
+ bool ok;
+ parser_info pi = parser;
+ parser.file = file;
+ parser.line_no = line;
+ parser.from_file = false;
+ QMap<QString, QStringList> tmp = vars;
+ const QStringList ret = doVariableReplaceExpand(str, tmp, &ok);
+ parser = pi;
+ return ok ? ret.join(QString(Option::field_sep)) : QString();
+}
+
QStringList
QMakeProject::expand(const QString &func, const QList<QStringList> &args)
{