-
Notifications
You must be signed in to change notification settings - Fork 21
sync: from linuxdeepin/dtkdeclarative #331
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
base: master
Are you sure you want to change the base?
Conversation
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#556
Reviewer's GuideSynchronizes the build and packaging configuration with upstream dtkdeclarative by switching from version-derived Qt/DTK selection to an explicit DTK5 option, introducing DTK name suffix handling, and consistently updating library, module, examples, tests, and docs CMake files to use the new variables and versioning scheme. Flow diagram for DTK5 option and version configuration in CMakeListsflowchart TD
A_read_version[file_READ_VERSION]
B_strip_version[string_STRIP_VERSION]
C_project[project_DtkDeclarative_VERSION_FILE_VERSION]
D_option_DTK5[option_DTK5_default_ON]
E{DTK5}
F_set_DTK5[set_DTK_VERSION_MAJOR_5\nset_DTK_NAME_SUFFIX_empty]
G_set_DTK6[set_DTK_VERSION_MAJOR_6\nset_DTK_NAME_SUFFIX_6]
H_set_DTK_VERSION[set_DTK_VERSION_MINOR\nset_DTK_VERSION_PATCH\nset_DTK_VERSION]
I_set_QT_VERSION_MAJOR[set_QT_VERSION_MAJOR_DTK_VERSION_MAJOR]
J_set_LIB_NAME[set_LIB_NAME_dtk_DTK_NAME_SUFFIX_declarative]
K_set_paths[set_INCLUDE_INSTALL_DIR_dtk_DTK_VERSION_MAJOR\nset_CONFIG_INSTALL_DIR_Dtk_DTK_NAME_SUFFIX_Declarative\nset_DDECLARATIVE_TRANSLATIONS_DIR_dtk_DTK_VERSION_MAJOR]
L_add_subdirs_DTK5[add_subdirectory_src\nadd_subdirectory_qmlplugin]
M_add_subdirs_DTK6[add_subdirectory_qt6]
N_enable_testing[enable_testing_if_BUILD_TESTING]
O_config_files[configure_package_config_file_Dtk_DTK_NAME_SUFFIX_DeclarativeConfig\nwrite_basic_package_version_file_Dtk_DTK_NAME_SUFFIX_DeclarativeConfigVersion]
A_read_version --> B_strip_version --> C_project --> D_option_DTK5 --> E
E -->|ON| F_set_DTK5
E -->|OFF| G_set_DTK6
F_set_DTK5 --> H_set_DTK_VERSION
G_set_DTK6 --> H_set_DTK_VERSION
H_set_DTK_VERSION --> I_set_QT_VERSION_MAJOR --> J_set_LIB_NAME --> K_set_paths
E -->|DTK5_ON| L_add_subdirs_DTK5
E -->|DTK5_OFF| M_add_subdirs_DTK6
H_set_DTK_VERSION --> N_enable_testing
H_set_DTK_VERSION --> O_config_files
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review我来对这个CMakeLists.txt的变更进行审查:
建议:
总的来说,这次变更主要改进了版本控制逻辑,使代码更加清晰和易于维护,是一个正向的改进。 |
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 - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `docs/CMakeLists.txt:20` </location>
<code_context>
+if (DTK5)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Help)
else()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ToolsTools)
</code_context>
<issue_to_address>
**issue (bug_risk):** The `ToolsTools` Qt component name looks like a typo and will likely break `find_package`.
The original code used `Help`, and Qt modules are typically named `Tools`, not `ToolsTools`. This will likely cause CMake configuration to fail. Please verify the correct module name (e.g., `Tools`) and update the `find_package` call.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| if (DTK5) | ||
| find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Help) | ||
| else() | ||
| find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ToolsTools) |
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.
issue (bug_risk): The ToolsTools Qt component name looks like a typo and will likely break find_package.
The original code used Help, and Qt modules are typically named Tools, not ToolsTools. This will likely cause CMake configuration to fail. Please verify the correct module name (e.g., Tools) and update the find_package call.
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkdeclarative\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | e63b02d733"
}
]
} |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-ci-robot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Synchronize source files from linuxdeepin/dtkdeclarative.
Source-pull-request: linuxdeepin/dtkdeclarative#556
Summary by Sourcery
Switch the build configuration to derive DTK/Qt major version and naming from a DTK5 option and the VERSION file, unifying how DTK5 and DTK6 variants are handled.
Build:
Documentation:
Tests: