fix line number display

the line numbers are limited to unsigned short in the parser and
consequently the evaluator. as that's an internal detail that could
change any time, the display works with ints. so the special value ~0
needs to be converted to -1 in the right place.

Change-Id: Ia9437164b88ecf2077ffc4c01d7e16033970df1b
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Oswald Buddenhagen
2012-08-28 18:19:18 +02:00
parent 475fe8ec8b
commit e513ee1bb0
2 changed files with 4 additions and 3 deletions

View File

@@ -1854,7 +1854,8 @@ void QMakeEvaluator::message(int type, const QString &msg) const
{
if (!m_skipLevel)
m_handler->message(type, msg,
m_current.line ? m_current.pro->fileName() : QString(), m_current.line);
m_current.line ? m_current.pro->fileName() : QString(),
m_current.line != 0xffff ? m_current.line : -1);
}
#ifdef PROEVALUATOR_DEBUG

View File

@@ -248,9 +248,9 @@ public:
struct Location {
Location() : pro(0), line(0) {}
Location(ProFile *_pro, int _line) : pro(_pro), line(_line) {}
Location(ProFile *_pro, ushort _line) : pro(_pro), line(_line) {}
ProFile *pro;
int line;
ushort line;
};
Location m_current; // Currently evaluated location