-
Notifications
You must be signed in to change notification settings - Fork 73
fix: compile faild when use lupdate #1131
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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()这些改动提高了代码的健壮性和可靠性,同时保持了良好的性能。 |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
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: