Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-26238

headers not parsed unless included from a source file

    XMLWordPrintable

Details

    • 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)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            cadam Cristian Adam
            timblechmann tim blechmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes