Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1733 Auto Qt #1772

Merged
merged 11 commits into from
Feb 11, 2024
Merged

1733 Auto Qt #1772

merged 11 commits into from
Feb 11, 2024

Conversation

trisyoungs
Copy link
Member

This PR started off as a quick "30 minutes left on a Friday" job, but has turned into a "waste the whole of Monday" task instead. This is a big PR, but most of it is just renaming and only the first and last commits are particularly interesting.

So to begin we were already using CMake's AUTOMOC option, but not AUTORCC or AUTOUIC, and were kind of half-blending the automated integration with the qt6_wrap_* mechanism (not recommended). Switching out to full auto cleans up a lot of our filenames, removing the "custom" *.hui and *Funcs.cpp namings in favour of plain old *.h and *.cpp (the latter was a legacy introduced many years ago when I was getting clashes between Qt-generated *.cpp files, from processing ui files, with my own).

However, moving to full auto introduces a problem whereby now autogenerated files are stored in many separate locations, rather than in a single build dir), meaning CMakeLists.txt have had to be adjusted in a few places in order to find the necessary ui_* files. This was a particular issue for the moduleWidgetProducer target which needed to find N ui_* files for N modules in N different locations. A solution is in place, but perhaps someone with a better relationship with CMake can implement a better one (see final commit).

Closes #1733.

@trisyoungs
Copy link
Member Author

@RobBuchananCompPhys are you OK with me merging this in now, since it will cause a conflict with your other charges PR #1787, or would you like me to wait?

@trisyoungs trisyoungs merged commit 8dfb71c into develop Feb 11, 2024
10 checks passed
@trisyoungs trisyoungs deleted the 1733-auto-qt branch February 11, 2024 13:23
rprospero pushed a commit that referenced this pull request Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Qt AutoMoc
2 participants