Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 12.0.2
-
None
-
Arch Linux
-
-
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:
- 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. - 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
- relates to
-
QTCREATORBUG-27432 QtCreator: cmake source_group not working properly
- Closed