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

[BareMetal] Disappeared highlighting of a compiler defines in a header files

    XMLWordPrintable

Details

    • e3def98c001a90e8046e6f20dd332927481abdec (qt-creator/qt-creator/master)

    Description

      I use QtC with QBS project manager for the bare-metal projects, using new added KEIL, IAR or SDCC toolchains (also a GCC toolchains).

      When I create a Kit which contains only one C-compiler (or KEIL, or IAR, or SDCC, or GCC), then the highlighting of a compiler defines does not work for a header files if this files located in a group without of a sources.

      = Example 1 = (this project also is attached):

      CppApplication {
          name: "bug"
          Group { files: [ "foo.h"] } /// << HERE HIGHLIGHTING BROKEN !!!
          Group { files: ["main.c", "bar.h"] }
      }
      

      in this example the highlighting of the compiler defines does not work for a file 'foo.h', but for files 'main.c' and 'bar.h' it does work.

      = Example 2 =

      CppApplication {
          name: "bug"
          Group { files: ["main.c", "bar.h", "foo.h"] } /// << HERE ALL FINE FOR ALL FILES !!!
      }
      

      in this case all does work.

      = Example 3 =

      CppApplication {
          name: "bug"
          Group { files: [ "foo.h", "bar.h"] } /// << HERE HIGHLIGHTING BROKEN !!!
          Group { files: ["main.c"] }
      }
      

      in this case the highlighting does not work for files 'foo.h' and 'bar.h'...

      So, as you can see, that if a group contains only a header files, then the highlighting does not work.

      But, if to add to the Kit and the C++ compiler, then all becomes working.

      This issue reproduces as with a new 'bare-metal' toolchains (KEIL, IAR, SDCC), but also and with GCC.

      Attachments

        1. gcc-kit.png
          gcc-kit.png
          34 kB
        2. highlight-broken.png
          highlight-broken.png
          32 kB
        3. highlight-ok.png
          highlight-ok.png
          27 kB
        4. qtcbug-22421.zip
          3 kB
        For Gerrit Dashboard: QTCREATORBUG-22421
        # Subject Branch Project Status CR V

        Activity

          People

            kosjar Nikolai Kosjar
            kuzulis Denis Shienkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes