diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-08-22 11:19:54 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-09-03 17:56:24 +0200 |
commit | 00e9be42463d012d6288ad03bed9ee37e179c35f (patch) | |
tree | 541c9b8cf3b280c2b18ef1980a1b635386819ba7 /src/shared/proparser/qmakeparser.cpp | |
parent | 26e9f25a3ee260b95be7e08e0236698c50053290 (diff) | |
download | qt-creator-00e9be42463d012d6288ad03bed9ee37e179c35f.tar.gz |
make messages from dynamic code tell a useful location
"(eval)" does not exactly help to find the error source.
Change-Id: Iecd03e6a4909ca6d7eab846844ca4415ebfa3429
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Diffstat (limited to 'src/shared/proparser/qmakeparser.cpp')
-rw-r--r-- | src/shared/proparser/qmakeparser.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/shared/proparser/qmakeparser.cpp b/src/shared/proparser/qmakeparser.cpp index 055cb3e7e9..4bd3432279 100644 --- a/src/shared/proparser/qmakeparser.cpp +++ b/src/shared/proparser/qmakeparser.cpp @@ -194,10 +194,11 @@ ProFile *QMakeParser::parsedProFile(const QString &fileName, bool cache) return pro; } -ProFile *QMakeParser::parsedProBlock(const QString &name, const QString &contents, SubGrammar grammar) +ProFile *QMakeParser::parsedProBlock( + const QString &contents, const QString &name, int line, SubGrammar grammar) { ProFile *pro = new ProFile(name); - if (!read(pro, contents, grammar)) { + if (!read(pro, contents, line, grammar)) { delete pro; pro = 0; } @@ -224,7 +225,7 @@ bool QMakeParser::read(ProFile *pro) QString content(QString::fromLocal8Bit(bcont)); bcont.clear(); file.close(); - return read(pro, content, FullGrammar); + return read(pro, content, 1, FullGrammar); } void QMakeParser::putTok(ushort *&tokPtr, ushort tok) @@ -264,10 +265,10 @@ void QMakeParser::finalizeHashStr(ushort *buf, uint len) buf[-2] = (ushort)(hash >> 16); } -bool QMakeParser::read(ProFile *pro, const QString &in, SubGrammar grammar) +bool QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar grammar) { m_proFile = pro; - m_lineNo = 1; + m_lineNo = line; // Final precompiled token stream buffer QString tokBuff; |