From ad17a35853fe21a93fc34f7b2d9262c5ac992b29 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 13 May 2016 15:32:50 +0200 Subject: 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 Reviewed-by: Oswald Buddenhagen --- qmake/project.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qmake/project.cpp') 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 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; -- cgit v1.2.3