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

cmake: incorrect source_group filters in some situations

    XMLWordPrintable

Details

    • Linux/Wayland
    • f76e0de7b (13.0)

    Description

      As of Qt Creator 12, in some situations source files organized with source_group() shows incorrect filters, adding extra directories based on their filesystem location.

       

      For example, see the following screenshot from configuring my open source project DeepSea:

       

       

      This mainly comes up for the source group filters for my include folders. I suspect this is a combination of two factors:

      1. When looking at the code to create the tree structure within Qt Creator introduced from QTCREATORBUG-29799, it has different logic for whether the path for the source group exists or not.
      2. Each library in my project has a common include directory "DeepSea/<lib-name>" that I strip out from the source group. (this simplifies the organization since otherwise it's two additional folders that you need to expand to see the files)

      As a result, it checks "does this for the source group path exist?" for the includes, and since the answer is no, it appends the directories from the filesystem to the directories in the source_group filter. However, this causes very strange filters to be created. (e.g.: "include/Shaders" becomes "include/Shaders/include/DeepSea/Animation/Shaders")

       

      If a source group is provided, I think it would be better to ignore all the filesystem directories and just use the folders from the source group when creating the virtual folder hierarchy displayed in the project.

      Attachments

        Issue Links

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

          Activity

            People

              cadam Cristian Adam
              akb825 Aaron Barany
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes