forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user