summaryrefslogtreecommitdiffstats
path: root/qmake/project.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-05-13 15:32:50 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2016-05-24 12:38:59 +0000
commitad17a35853fe21a93fc34f7b2d9262c5ac992b29 (patch)
tree668279d86081849c0cfd01933ebf687694d93f46 /qmake/project.cpp
parent11d957d04381c7162dd5621c61f9963580ec7041 (diff)
make QMakeParser take a QStringRef as input
the only place where this actually saves a deep copy is the evaluation of if(), but as a side effect the parser is now able to deal with not null-terminated strings, which is kinda nice as well. Change-Id: Ib6d08617aa79d2f9eaecd4906d4d548f34bf377d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'qmake/project.cpp')
-rw-r--r--qmake/project.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 01adb7422c..28a6c72a46 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -120,7 +120,8 @@ QStringList QMakeProject::expand(const ProKey &func, const QList<ProStringList>
ProString QMakeProject::expand(const QString &expr, const QString &where, int line)
{
ProString ret;
- ProFile *pro = m_parser->parsedProBlock(expr, where, line, QMakeParser::ValueGrammar);
+ ProFile *pro = m_parser->parsedProBlock(QStringRef(&expr), where, line,
+ QMakeParser::ValueGrammar);
if (pro->isOk()) {
m_current.pro = pro;
m_current.line = 0;