Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 5.0.0
-
None
-
4cad094066370fd177e3cb7fde64fd80e05eee84 (qt-creator/tqtc-qt-creator/master)
Description
there seems to be a regression on how headers are parsed, which affects header-only libraries:
my projects look like this:
```
add_library(foo a.cpp a.h b.h)
```
the header `b.h` is listed in the project tree for target `foo`. so far so good. however the code model cannot parse `b.h` correctly, unless it is included in a c++ file: qtcreator warns that the header is not part of a project
it seems that qtcreator populates the parse context for a header based on all targets that include `b.h` (which is great), but it doesn't infer the parse context from the cmake target that lists the header in the sources (in this case i'd expect b.h to be parsed in the context of library foo for example)