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

should update parsing context of header files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • None
    • Qt Creator 4.14.0-rc1
    • C/C++/Obj-C++ Support

    Description

      i configured qtbase/dev with cmake, and loaded it into qt creator.

      when the first file i open is qprocess_p.h, the #if QT_CONFIG(process) (currently on line 226) is not recognized as enabled. however, i can correctly follow the include chain to qtcore-config.h, and i can clearly see that the relevant #define is there. modifying the _p.h file does nothing to change the situation; however, when i close and re-open it after a while, things suddenly work.

      i think i know what is happening: there are several parsing contexts inside qtbase, in particular with and without QT_BOOTSTRAPPED being #defined, and there is no way to deduce the context of a header file that was opened "just so" before the entire project is parsed.

      but once the code model parsing completes, i'd expect the situation to be corrected automatically.

      if there is ambiguity due to the header being used in multiple contexts, the context should be determined by other (active) files in the workspace.

      if that is still ambiguous due to open sources being used in different contexts, the context should be determined manually by selecting a build target (note that this cannot just be the run/debug target, as that is meaningless for libraries).

      Attachments

        Activity

          People

            kandeler Christian Kandeler
            buddenha Oswald Buddenhagen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: