fix: rename QML value type NetType to netType to silence Qt6 naming warning - #605
Conversation
|
Skipping CI for Draft Pull Request. |
Reviewer's GuideRenames the Qt6-registered File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
4680673 to
e83656f
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 52cyb, 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 |
1. Rename QML value type registration "NetType" to "netType" in dccnetwork.cpp to satisfy Qt6 value type naming convention 2. Update 101 NetType. references to netType. across 15 QML files 3. Keep C++ class name NetType and all NetType:: enum references unchanged Influence: 1. Verify no "Invalid QML element name" warning at runtime 2. Confirm network control center QML pages load and display correctly 3. Check NetType enum values resolve correctly in QML fix: 将 QML NetType 注册名改为 netType 1. 将 dccnetwork.cpp 中 QML 值类型注册名 "NetType" 改为 "netType",符合 Qt6 值类型命名约定 2. 更新 15 个 QML 文件中 101 处 NetType. 引用为 netType. 3. C++ 类名 NetType 及所有 NetType:: 枚举引用保持不变 Influence: 1. 验证运行时不再出现 "Invalid QML element name" 警告 2. 确认控制中心网络 QML 页面加载和显示正常 3. 检查 QML 中 NetType 枚举值解析正确
e83656f to
46309af
Compare
|
/forcemerge |
|
This pr force merged! (status: unstable) |
Fix:
Invalid QML element name "NetType"warningFixes the runtime warning:
Root cause
NetTypeis declared as aQ_GADGETclass (an enum container, never instantiated) innet-view/operation/nettype.h. In Qt6,Q_GADGETtypes are registered as value types, and value type names must begin with a lowercase letter. It was registered with an uppercase name"NetType"indcc-network/operation/dccnetwork.cpp:32, triggering the warning.Changes
dcc-network/operation/dccnetwork.cpp:32: changed the 4th argument ofqmlRegisterType<NetType>(...)from"NetType"to"netType"(the C++ template parameter<NetType>is unchanged).dcc-network/qml/: updated 101NetType.references tonetType.across 15 QML files (enum value accesses only;import org.deepin.dcc.network 1.0URIs unchanged).NetTypeand allNetType::enum references remain unchanged — only the QML element name is renamed.Total: 16 files changed, 99 insertions(+), 99 deletions(-).
Verification (already passed)
Invalid QMLwarnings: 0 (target warning eliminated). 6 binary deb packages generated normally.Multica issue
DDE-148: dde-network-core: QML 类型注册警告 NetType 值类型名应以小写字母开头
Summary by Sourcery
Bug Fixes: