chore: update license info handling and add default loading#552
Open
mhduiy wants to merge 1 commit intolinuxdeepin:masterfrom
Open
chore: update license info handling and add default loading#552mhduiy wants to merge 1 commit intolinuxdeepin:masterfrom
mhduiy wants to merge 1 commit intolinuxdeepin:masterfrom
Conversation
18202781743
reviewed
Mar 26, 2026
src/dlicenseinfo.cpp
Outdated
| return d->licenseContent(licenseName); | ||
| } | ||
|
|
||
| bool DLicenseInfo::loadDefault() |
Contributor
There was a problem hiding this comment.
能不加这个接口么,需要的话path判空来处理逻辑?
Contributor
Author
There was a problem hiding this comment.
本来是想在构造函数直接加载的, 但是考虑到可能会有懒加载的需求,就作为一个接口,而且语义比loadFile传入一个空更好一些;
fe97c7e to
3f3d43a
Compare
18202781743
reviewed
Mar 27, 2026
| @@ -1,4 +1,4 @@ | |||
| // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | |||
deec269 to
a98a77d
Compare
1. Extended copyright year range from 2023 to 2023-2026 2. Added support for automatic license file discovery in standard data locations 3. When no file path is provided, now searches for application-specific JSON config in deepin/credits directory 4. Enhanced license content search to check both custom-licenses and spdx-licenses directories in all standard data locations 5. Improved code organization with constants for directory names 6. Simplified license content loading logic with early returns chore: 更新许可证信息加载和搜索路径 1. 将版权年份范围从2023年扩展到2023-2026年 2. 添加对标准数据位置中自动发现许可证文件的支持 3. 当未提供文件路径时,现在会在deepin/credits目录中搜索应用程序特定的 JSON配置 4. 增强许可证内容搜索,在所有标准数据位置中检查custom-licenses和spdx- licenses目录 5. 使用常量优化目录名称的代码组织 6. 通过提前返回简化许可证内容加载逻辑 PMS: TASK-387863
18202781743
approved these changes
Mar 27, 2026
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy 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 |
18202781743
reviewed
Mar 27, 2026
| { | ||
| QByteArray content; | ||
| QStringList dirs{"/usr/share/spdx-license"}; | ||
| const QStringList dataDirs = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation); |
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.
Log: Improved license information management with better path handling and default configuration loading
chore: 更新许可证信息处理并添加默认加载功能
Log: 改进了许可证信息管理,提供更好的路径处理和默认配置加载功能
PMS: TASK-387863