summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/qmakelib
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 /tests/auto/tools/qmakelib
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 'tests/auto/tools/qmakelib')
-rw-r--r--tests/auto/tools/qmakelib/evaltest.cpp4
-rw-r--r--tests/auto/tools/qmakelib/parsertest.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/tools/qmakelib/evaltest.cpp b/tests/auto/tools/qmakelib/evaltest.cpp
index aaa4bb3724..4642c822bc 100644
--- a/tests/auto/tools/qmakelib/evaltest.cpp
+++ b/tests/auto/tools/qmakelib/evaltest.cpp
@@ -2477,12 +2477,12 @@ void tst_qmakelib::proEval()
globals.environment = m_env;
globals.setProperties(m_prop);
globals.setDirectories(m_indir, m_outdir);
- ProFile *outPro = parser.parsedProBlock(out, "out", 1, QMakeParser::FullGrammar);
+ ProFile *outPro = parser.parsedProBlock(QStringRef(&out), "out", 1, QMakeParser::FullGrammar);
if (!outPro->isOk()) {
qWarning("Expected output is malformed");
verified = false;
}
- ProFile *pro = parser.parsedProBlock(in, infile, 1, QMakeParser::FullGrammar);
+ ProFile *pro = parser.parsedProBlock(QStringRef(&in), infile, 1, QMakeParser::FullGrammar);
QMakeEvaluator visitor(&globals, &parser, &vfs, &handler);
visitor.setOutputDir(m_outdir);
#ifdef Q_OS_WIN
diff --git a/tests/auto/tools/qmakelib/parsertest.cpp b/tests/auto/tools/qmakelib/parsertest.cpp
index 5f345617db..6857334746 100644
--- a/tests/auto/tools/qmakelib/parsertest.cpp
+++ b/tests/auto/tools/qmakelib/parsertest.cpp
@@ -1955,7 +1955,7 @@ void tst_qmakelib::proParser()
handler.setExpectedMessages(msgs.split('\n', QString::SkipEmptyParts));
QMakeVfs vfs;
QMakeParser parser(0, &vfs, &handler);
- ProFile *pro = parser.parsedProBlock(in, "in", 1, QMakeParser::FullGrammar);
+ ProFile *pro = parser.parsedProBlock(QStringRef(&in), "in", 1, QMakeParser::FullGrammar);
if (handler.printedMessages()) {
qWarning("Got unexpected message(s)");
verified = false;