Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.8.5, 5.1.1
-
None
-
Win7 MSVC2010
-
96ff51f856c34c7826c13c2d4c376022e6b7d027
Description
In source files that start with a UTF-8 BOM, qmake misses header dependencies on the first line because it considers the BOM as non-whitespace and hence sets beginning=0.
Further, the parsing of quoted strings also has a bug: when the closing '\'' or '"' is detected, x gets incremented, and then the outer for loop increments it again. This results in qmake missing the character immediately following the quoted string as well. That means that, having missed the first #include line because of BOM, we miss subsequent ones as well, until reaching some line that is not #include "..."\n.
This bug can be observed in the resulting Makefile: example.c gets all headers detected, but example-utf8.c is missing the first three
release\example.obj: example.c C:\Desktop\example\missing.h \
C:\Desktop\example\also-missing.h \
C:\Desktop\example\detected.h
release\example-utf8.obj: example-utf8.c C:\Desktop\example\detected.h