qmake: Fix comment false-alarm bug in findMocs().

If a / wasn't part of a comment-start, it and the character after it
were none the less stepped over.  If the character after started an
enclosure, this would duly be missed, leading to mis-parsing of the
subsequent text.  As for similar bug recently fixed in findDeps().

Change-Id: Ie5329ec633c23a554b42a6351723c980e27fb9a9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Edward Welbourne 2015-11-26 10:31:28 +01:00
parent 769027dcb3
commit 209a26c6c4
2 changed files with 3 additions and 0 deletions

View File

@ -919,6 +919,8 @@ bool QMakeSourceFileInfo::findMocs(SourceFile *file)
++line_count;
}
}
} else { // not a comment, in fact; undo the extra x++ we did.
x--;
}
}
} else if (buffer[x] == '\'' || buffer[x] == '"') {

View File

@ -33,6 +33,7 @@
/**//*'*/
#include <QObject>
#define bogon /"/*"
class Object7 : public QObject
{