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 /tests/manual/proparser | |
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 'tests/manual/proparser')
-rw-r--r-- | tests/manual/proparser/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/manual/proparser/main.cpp b/tests/manual/proparser/main.cpp index fe73366f03..1fbb4b2eb5 100644 --- a/tests/manual/proparser/main.cpp +++ b/tests/manual/proparser/main.cpp @@ -47,8 +47,10 @@ static void print(const QString &fileName, int lineNo, int type, const QString & { QString pfx = ((type & QMakeHandler::CategoryMask) == QMakeHandler::WarningMessage) ? QString::fromLatin1("WARNING: ") : QString(); - if (lineNo) + if (lineNo > 0) qWarning("%s%s:%d: %s", qPrintable(pfx), qPrintable(fileName), lineNo, qPrintable(msg)); + else if (lineNo) + qWarning("%s%s: %s", qPrintable(pfx), qPrintable(fileName), qPrintable(msg)); else qWarning("%s%s", qPrintable(pfx), qPrintable(msg)); } |