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

QbsPM: cpp.distributionIncludePaths has not effect for headers highlighting

    XMLWordPrintable

Details

    • Linux/Wayland, Windows
    • 7fad01eb026d92007fc8a813601625a465c1db6a (qt-creator/qt-creator/master)

    Description

      When we use QBS project and specify there the cpp.distributionIncludePaths property, then the header files from that paths highlighted as 'undefined'. Also the defines from that files not highlighted too.

      Note: at least this makes sense only with GCC-based toolchains, where '-system' option has effects.

      Please look on an example sources from an attached archive:

      == app.qbs ==

      import qbs
      
      Application {
          condition: {
              console.info("p: " + cpp.distributionIncludePaths)
              return true
          }
      
          Properties {
              condition: qbs.toolchain.contains("gcc")
              cpp.driverFlags: [
                  "-mcpu=cortex-m3",
                  "-specs=nosys.specs"
              ]
          }
      
          consoleApplication: true
          Depends { name: "cpp" }
          cpp.distributionIncludePaths: [ sourceDirectory  + "/dist-includes"]
          files : [ "main.cpp" ]
      }
      

      == main.cpp ==

      #include <foo.h>
      
      int main()
      {
          return FOO;
      }
      

      == foo.h ==

      #pragma once
      
      #define FOO 123
      

      Attachments

        1. dist-paths-bug.png
          13 kB
          Denis Shienkov
        2. qtcbug-24162.zip
          0.7 kB
          Denis Shienkov

        Activity

          People

            kandeler Christian Kandeler
            kuzulis Denis Shienkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: