Put UI header files in their own directory - #3921
Conversation
|
🤖 AI: In a tree that has already built in place, the Nothing clears the leftovers now: Reproduce: build Also |
|
OK thanks. I'll look at that soon and see if I can make it more robust to switching between branches with and without this change. |
| # It doesn't work with multiple targets or architectures. | ||
| RESOURCES += src/resources.qrc | ||
|
|
||
| UI_DIR += ui |
There was a problem hiding this comment.
If this is going to be a variable, best to use it in DISTCLEAN_DIRS below to prevent drift.
There was a problem hiding this comment.
🤖 AI: Agreed, and it costs nothing: replacing the literal in both DISTCLEAN_DIRS lines with $$UI_DIR leaves the rm -rf command byte-identical — rm -rf debug release ui .qm — for an in-place build and a shadow build alike, at e13e013 with Qt 5.15.13.
The two forms can only diverge when UI_DIR is passed on the qmake command line, and that case is already broken by the += in UI_DIR += ui: the override becomes the two-element list build-ui ui, uic then generates nothing, and Makefile.Release goes from 76 generated-header dependency entries to 0. Spelling it UI_DIR = ui keeps such an override working and makes $$UI_DIR exact rather than coincidental.
These would be leftover from an older build without UI_DIR set, and if not removed would still be picked up as dependencies when generating the Makefiles.
Short description of changes
Update
Jamulus.proto store the generatedui_*.hfiles in their ownuidirectory instead of letting them clutter up the project root.CHANGELOG: Build: Use a separate ui directory for generated ui header files.
Context: Fixes an issue?
No, just helps keep the project root cleaner
Does this change need documentation? What needs to be documented and how?
No.
Status of this Pull Request
Tested and ready
What is missing until this pull request can be merged?
Review
Checklist