Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: caixr23 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 |
Reviewer's GuideThis PR performs a mechanical, project-wide cleanup of QML import statements for Qt 6 by removing explicit major.minor version numbers from module imports while preserving aliases and leaving non-versioned or relative/script imports untouched; no C++/CMake logic is changed. Flow diagram for QML import version cleanupflowchart TD
QMLFile[QMLFile]
ImportStmt["import ModuleName Major.Minor [as Alias]"]
CleanImport["import ModuleName [as Alias]"]
QMLFile --> ImportStmt
ImportStmt --> CleanImport
subgraph Rule
V1["If import has numeric Major.Minor version"]
V2["Remove version; keep ModuleName and optional as Alias"]
V3['Leave imports without version or with ""-style/JS path unchanged']
V1 --> V2 --> V3
end
CleanImport --> QMLFile
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
eb626fd to
f57defc
Compare
Two mechanical changes to QML files, both required for the Qt6 migration
of this project:
1. Remove `major.minor` version suffixes from QML import statements.
Qt6 modules no longer require a version number in imports.
- 162 *.qml files, 724 import statements updated
- Only the version suffix is removed; `as` aliases are preserved
(e.g. `import org.deepin.dtk 1.0 as D` -> `import org.deepin.dtk as D`)
- Relative/script imports and already-versionless imports untouched
- No CMake or C++ changes; qmlRegisterType / qt_add_qml_module VERSION
registration code kept as-is
2. Update SPDX-FileCopyrightText years on the modified files so the
end year reflects the actual 2026 modification, and fix two
pre-existing truncation typos.
- 35 files: single year -> ` - 2026` range
(`2024` -> `2024 - 2026`, `2025` -> `2025 - 2026`, using the
` - ` spacing that matches the repo majority; includes one
`//SPDX` no-space-prefix line)
- 31 files: end year `2024 - 2027` -> `2024 - 2026`
(the modification happened in 2026, so the range end year should
be 2026, not 2027; start year/separator/holder text preserved)
- 2 files: `Co., Lt` -> `Co., Ltd.` (truncated holder name)
- After these changes all 162 files end at 2026; SPDX-License-Identifier
lines left untouched
Verification:
- `grep -rnE '^\s*import\s+[^ "]+\s+[0-9]+\.[0-9]+' --include=*.qml . | wc -l` == 0
- No residual single-year (non-2026) or `2027` SPDX-FileCopyrightText
lines on the 162 changed files
- Build verified on Qt6 (V25): qt_add_qml_module compile-time QML type
checks pass; all 9 qmlRegisterType-registered URIs resolve correctly;
SPDX-only diffs produced zero new warnings/errors vs the prior build
Issue: DDE-105
Signed-off-by: caixiangrong <caixiangrong@uniontech.com>
f57defc to
fac990b
Compare
|
TAG Bot New tag: 6.1.105 |
|
TAG Bot New tag: 6.1.106 |
|
TAG Bot New tag: 6.1.107 |
|
TAG Bot New tag: 6.1.109 |
概述
对项目中改动的
*.qml文件做两项机械变更,配合 Qt6 迁移:主版本.次版本版本号(Qt6 不再需要)。SPDX-FileCopyrightText版权年份,使终止年统一为 2026(反映实际修改时间),并修复 2 处既有持有人名截断笔误。关联 issue:DDE-105
变更范围(162 个
*.qml文件,单 commit)1. import 去版本号
as别名完整保留(如import org.deepin.dtk 1.0 as D→import org.deepin.dtk as D)import "DccUtils.js" as DccUtils)与已无版本号 import 原样保留qmlRegisterType/qt_add_qml_module VERSION注册代码保持不变2. SPDX 版权年份统一至 2026
- 2026范围2024→2024 - 2026(含 1 个//SPDX无空格前缀写法,共 19 个)2025→2025 - 2026(16 个)-(带空格),与仓内主流写法一致2024 - 2027→2024 - 2026(文件实际在 2026 年被修改,终止年应为 2026;起始年/分隔符/持有人文字保留)…Co., Lt→…Co., Ltd.(既有截断笔误补全,年份不变)src/plugin-datetime/qml/RegionsChooserWindow.qmlsrc/plugin-datetime/qml/SearchableListViewPopup.qmlSPDX-License-Identifier行未动示例
import QtQuick 2.15import QtQuickimport org.deepin.dtk 1.0 as Dimport org.deepin.dtk as D// SPDX-FileCopyrightText: 2024 UnionTech …// SPDX-FileCopyrightText: 2024 - 2026 UnionTech …// SPDX-FileCopyrightText: 2024 - 2027 UnionTech …// SPDX-FileCopyrightText: 2024 - 2026 UnionTech …… Co., Lt… Co., Ltd.验证
grep -rnE '^\s*import\s+[^ "]+\s+[0-9]+\.[0-9]+' --include=*.qml . | wc -l== 02027版权行 == 0;不含 2026 的SPDX-FileCopyrightText行 == 0(162 文件终止年已统一为 2026)qt_add_qml_module编译期 QML 类型检查全部通过;SPDX 纯注释变更无回归,warning/error 集合与改动前逐条一致)说明
01a845985的单次提交(fac990b85),由原eb626fdff(import)→f57defcc6(+ 35 单年/2 笔误)→fac990b85(+ 31 终止年 2027→2026)逐步 amend 合入后强推更新,未新建 PR。