fix: compile faild when use lupdate#1131
Merged
deepin-bot[bot] merged 1 commit intoCodeya-IDE:masterfrom Nov 6, 2025
Merged
Conversation
should use qt6 lupate instead of qt5 Log: Change-Id: Ic71413da1f26a2d8e122498704ce5968f0d67cd8
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deepin-mozart The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRefactors the CMake find_program call to prioritize and locate the Qt6 lupdate executable by extending the search names and adding explicit path hints. Flow diagram for updated lupdate command search logic in CMakeflowchart TD
A["Start CMake build (Release mode)"] --> B["For each TS file in translations/"]
B --> C["find_program LUPDATE_COMMAND with names: lupdate-Qt6, lupdate, lupdate-qt${QT_VERSION_MAJOR}, lupdate-qt4, lupdate-pro"]
C --> D["Search in paths: /usr/lib/qt6/bin, /usr/bin"]
D --> E{"LUPDATE_COMMAND found?"}
E -- Yes --> F["Process TS file"]
E -- No --> G["CMake FATAL_ERROR: lupdate command not found"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Leverage CMake's built-in Qt6 LinguistTools module (find_package(Qt6 COMPONENTS LinguistTools REQUIRED)) to obtain the lupdate executable instead of manual find_program logic.
- Avoid hardcoding POSIX bin paths (like /usr/lib/qt6/bin); prefer using CMAKE_PREFIX_PATH or Qt6 installation variables for better cross-platform support.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Leverage CMake's built-in Qt6 LinguistTools module (find_package(Qt6 COMPONENTS LinguistTools REQUIRED)) to obtain the lupdate executable instead of manual find_program logic.
- Avoid hardcoding POSIX bin paths (like /usr/lib/qt6/bin); prefer using CMAKE_PREFIX_PATH or Qt6 installation variables for better cross-platform support.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
deepin pr auto review我来帮你审查这个CMakeLists.txt的改动:
改进建议版本: find_program(LUPDATE_COMMAND
NAMES
lupdate-Qt6
lupdate
lupdate-qt${QT_VERSION_MAJOR}
lupdate-qt4
lupdate-pro
PATHS
/usr/lib/qt6/bin
/usr/bin
NO_DEFAULT_PATH
)
if (NOT LUPDATE_COMMAND)
message(FATAL_ERROR "lupdate command not found")
endif()
# 验证命令是否可执行
if (NOT EXISTS "${LUPDATE_COMMAND}" OR NOT EXECUTABLE "${LUPDATE_COMMAND}")
message(FATAL_ERROR "lupdate command at ${LUPDATE_COMMAND} is not executable")
endif()这些改动提高了代码的健壮性和可靠性,同时保持了良好的性能。 |
Contributor
Author
|
/forcemerge |
|
This pr force merged! (status: blocked) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
should use qt6 lupate instead of qt5
Log:
Change-Id: Ic71413da1f26a2d8e122498704ce5968f0d67cd8
Summary by Sourcery
Update CMakeLists to locate and use the Qt6 lupdate command
Bug Fixes:
Enhancements: