Repository navigation
Conversation
197bc49 to
75e533e
Compare
|
|
To avoid the clang-tidy warnings we need to disable all checks. See at the top of |
|
Thanks for you explanation. I don't get which folder needs the additional clang-tidy configuration file. My change does not add generated files in a new directory, does it? |
75e533e to
d940500
Compare
|
I see no reason to hold this back. Please consider merging. |
d940500 to
5bafd3b
Compare
|
5bafd3b to
5d409dd
Compare
5d409dd to
201e611
Compare
|
I don't know much about cmake and asked AI to review this. In my experience AI reviews are often mostly wrong - take this AI-review below with a mountain of salt: The deprecation claim checks out. Qt's own docs for qt_create_translation state it's deprecated in favor of the target-based qt6_add_lupdate/qt6_add_translations (Qt docs But the patch drops something it doesn't replace. The old code did: This isn't cosmetic: gui/translationhandler.cpp loads translations from disk at runtime (QFile::exists(datadir/lang/...), mTranslator->load(...)), not from a Qt resource. There's also direct corroborating evidence in the repo: .github/workflows/release-windows.yml does Minor secondary note: the PR deletes the comment # TODO: passing "-no-obsolete" here breaks the translations and then passes LUPDATE_OPTIONS "-no-obsolete" anyway. That's probably fine in Verdict: moving off QT_CREATE_TRANSLATION is the right direction, but this PR isn't a correct/complete fix — it needs to wire qms/QM_FILES_OUTPUT_VARIABLE back into the install() call and |
Use modern qt_add_translations instead.
201e611 to
5d0e4c5
Compare
dmcppcheck
left a comment
There was a problem hiding this comment.
AI review
I found no new problems. The change only touches gui/CMakeLists.txt. Qt 6 isn't installed in the container, so I couldn't configure or build the GUI and checked the change by reading it.
- The main concern in the AI review that C6 quoted doesn't apply to this version. The PR passes
QM_FILES_OUTPUT_VARIABLE qmstoqt_add_translations. That setsqms, soinstall(FILES ${qms} ...)still gets the loose.qmfiles, and the files are not embedded as a resource. qt_add_lreleasewrites the.qmfiles toCMAKE_CURRENT_BINARY_DIRby default, which isbuild/gui, the same folder as before. That is the folderrelease-windows.ymlmoves them from.- As I understand Qt's macros, they make
cppcheck-guidepend on its_lreleasetarget, socmake --build build --target cppcheck-guiin the release workflow should still generate the files. Only a real Qt build can confirm this.
The point C6 made about the deleted -no-obsolete TODO is still open.
Earlier comments
| # | Comment | By | Where | Status |
|---|---|---|---|---|
| 1 | Generated files may trigger clang-tidy warnings; all checks need to be disabled as at the top of gui/CMakeLists.txt | @firewave | general | 💬 Answered: Author says the change adds no generated files in a new directory and asked for clarification; no reply |
| 2 | qms is no longer set, so install(FILES ${qms}) installs nothing and .qm files are embedded instead of loose | @danmar | general | ✅ Fixed |
| 3 | TODO saying -no-obsolete breaks translations was deleted, yet LUPDATE_OPTIONS "-no-obsolete" is now passed | @danmar | general |
@gruenich, please fix, resolve or reply to the open comments: #3.
Testing
cmake ../../prwithout the GUI (in/work/scratch/b): configures fine. The changed code is insideif (BUILD_GUI), so this only shows that the rest of the configure still works.cmake -DBUILD_GUI=ON ../../pr: fails atfind_package(Qt6 ...)because Qt 6 is not installed in the container. So I could not configure or build the GUI, check whether the.qmfiles are generated and installed, or run theupdate_translationstarget.- I did not build or run
cppcheck/testrunner. The PR changes no C++ code or tests, so building them would not test anything that changed. - What I checked by reading:
qmsis now set throughQM_FILES_OUTPUT_VARIABLEand is still used byinstall(FILES ${qms} ...).LinguistToolsis already among the Qt components incmake/findDependencies.cmake.gui/translationhandler.cpploads loose.qmfiles from disk at runtime, which matches files that are not embedded.release-windows.ymlbuilds--target cppcheck-guiand movesbuild\gui\*.qm.
Automated review of 5d0e4c5 by Claude. The pull request was built and tested locally.
|
AI review (second opinion on the earlier AI review in #8062 (comment)) I built 5d0e4c5 with The earlier review, point by point
Problem: the release-windows build gets no .qm files
Tested with Qt 6.10.2, after deleting
This could be the same problem that made #8047 be reverted. Adding this after the add_dependencies(cppcheck-gui release_translations)I only tested this with Qt 6.10, so CI should confirm that it works with the oldest Qt too. Other notes
|



QT_CREATE_TRANSLATIONis deprecated.