Solved QtCreator 4.11.x Ignores Source Code Directory Structure with CMake
-
-
Up to Qt 5.13.x (Qt Creator 4.10.x) I could see my custom folder structure in Qt Creator like this:
+ Project Name | + CMakeLists.txt + include (* Custom Name) | + custom_include_subdir_1 + custom_include_subdir_2 + ... + src (* Custom Name) | + custom_src_subdir_1 (e.g models) + custom_src_subdir_2 (e.g ui) + custom_src_subdir_3 (e.g resource) + ... + etc (* Custom Name)
-
But starting in Qt Creator 4.11.x, all folder structures are ignored and files are sorted in 2 main folders (Source & Headers):
+ Project Name | + CMakeLists.txt + Source Files | + All *.h files without folder structure + Header Files | + All *.cpp files without folder structure + QML & UI Files (without folder structure)
-
Note that this has nothing to do with "Simplify Tree" option. This seems to be something with CMake projects. Is there any way I could restore old structure or should I go back to Qt Creator 10.x?
Regards.
UPDATE
Thanks to @mrjj
Installing 4.11.1 seems to have fixed this issue but a new one appeared. Now if you're working in group projects across multiple IDEs, this would be the project's structure:+ Project Name | + CMakeLists.txt + Header Files | + "incl" folder (or any other root folder for header files) | + incl_subdir_0 folder + incl_subdir_1 folder + ... + Source Files | + "src" folder (or any other root folder for source files) | + src_subdir_0 folder + src_subdir_1 folder + ... + QML & UI Files
This isn't as problematic as before, but it's still ugly. I hope developers would remove this feature or make it optional at least. This would become problematic with standard structured folders across multiple IDEs.
-
-
Hi
Did you try 4.11.1 ?
https://bugreports.qt.io/browse/QTCREATORBUG-23372
Seems related. -
Hi
Did you try 4.11.1 ?
https://bugreports.qt.io/browse/QTCREATORBUG-23372
Seems related. -
-
@mrjj Hi & Thanks.
I tried it and I can confirm that it is fixed but there's still something funny that I included in my question's update. -
HI
- I hope developers would remove this feature or make it optional at least. This would become problematic with standard structured folders across multiple IDEs.
Feel free to open an enhancement ticket and post link here.
People can then vote for it, if they like you - feel the good old way was the best and
if enough votes then it might happen :)