Skip to content

Put UI header files in their own directory - #3921

Open
softins wants to merge 1 commit into
jamulussoftware:mainfrom
softins:ui-dir
Open

Put UI header files in their own directory#3921
softins wants to merge 1 commit into
jamulussoftware:mainfrom
softins:ui-dir

Conversation

@softins

@softins softins commented Aug 21, 2026

Copy link
Copy Markdown
Member

Short description of changes

Update Jamulus.pro to store the generated ui_*.h files in their own ui directory 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

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

@softins softins added this to the Release 4.0.0 milestone Aug 21, 2026
@softins softins added this to Tracking Aug 21, 2026
@github-project-automation github-project-automation Bot moved this to Triage in Tracking Aug 21, 2026
@softins softins added the refactoring Non-behavioural changes, Code cleanup label Aug 21, 2026
@softins softins self-assigned this Aug 21, 2026
@mcfnord

mcfnord commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

🤖 AI: In a tree that has already built in place, the ui_*.h left in the project root take precedence over the new ones: INCPATH lists -I. before -Iui, and qmake's dependency scan binds to the root copy — after qmake on this branch, all 76 generated-header dependency entries in Makefile.Release name the root files, none name ui/. A .ui edit then recompiles nothing, and the linked binary still carries the pre-edit strings while the regenerated ui/ui_aboutdlgbase.h carries the new one (Linux, Qt 5.15.13, g++). The same rebinding and the same -I./-Iui order appear on macOS with Qt 5.15.2 and clang. Pinned at e13e013.

Nothing clears the leftovers now: compiler_uic_clean lists only ui/ui_*.h, so make clean and make distclean skip them, and .gitignore keeps them out of git status. One rm ui_*.h fixes a tree permanently — worth a line in the PR description or the CHANGELOG entry, since in-place builds are exactly what this declutters.

Reproduce: build main in place, check out this branch, run qmake, then grep -cE '^[[:space:]]+ui_[a-z]+\.h' Makefile.Release gives 76 and the same pattern with ui/ui_ gives 0; on a fresh clone the two counts are 0 and 76.

Also ui/ in .gitignore is unanchored, so it ignores any nested ui directory, src/ui/ included; /ui/ would scope it to the build output.

@softins

softins commented Aug 22, 2026

Copy link
Copy Markdown
Member Author

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.

@pljones pljones moved this from Triage to In Progress in Tracking Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Non-behavioural changes, Code cleanup

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants