Skip to content

fix: 修复飞行模式下无线网络页面缺少提示文案的问题 - #636

Merged
wjyrich merged 1 commit into
masterfrom
agent/bot/be276db3bc81
Sep 24, 2026
Merged

wjyrich merged 1 commit into
masterfrom
agent/bot/be276db3bc81

Conversation

@wjyrich

@wjyrich wjyrich commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

修复内容

修复飞行模式下无线网络页面缺少"若要使用无线网络功能,请先关闭飞行模式"提示文案的问题。

变更说明

  1. dcc-network/qml/NetworkMain.qml — 在 PageWirelessDevice delegate 中补充 airplaneItem: dccData.root 绑定,修复 airplaneItem 始终为 null 导致提示文案 visible 条件永远为 false 的问题
  2. dcc-network/qml/PageWirelessDevice.qml — 将热点场景的重复 DccObject 名称从 "airplaneTips" 改为 "hotspotTips",避免重名冲突

关联

Summary by Sourcery

Bug Fixes:

  • Restore the airplane-mode guidance message on the wireless network page by providing the required airplane-mode state to wireless device pages.

@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@sourcery-ai

sourcery-ai Bot commented Sep 22, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

本次修复通过向无线设备页面注入飞行模式状态,恢复飞行模式下“若要使用无线网络功能,请先关闭飞行模式”提示文案的显示;同时重命名热点提示对象以消除 DccObject 重名冲突。

Sequence diagram for airplane-mode wireless guidance

sequenceDiagram
    participant NetworkMain
    participant PageWirelessDevice
    participant DccDataRoot
    participant WirelessTips

    NetworkMain->>PageWirelessDevice: set airplaneItem to dccData.root
    PageWirelessDevice->>DccDataRoot: read airplane-mode state
    DccDataRoot-->>PageWirelessDevice: airplane-mode state
    alt airplane mode enabled
        PageWirelessDevice->>WirelessTips: show airplane-mode guidance
    else airplane mode disabled
        PageWirelessDevice->>WirelessTips: hide airplane-mode guidance
    end
Loading

File-Level Changes

Change Details Files
将飞行模式状态传递给无线网络设备页面,使提示文案能够根据实际状态显示。
  • 在无线设备 delegate 中绑定 airplaneItem 到 dccData.root
  • 验证 PageWirelessDevice 中提示文案的 visible 条件可获取有效飞行模式对象
dcc-network/qml/NetworkMain.qml
修正热点场景提示对象的命名,避免与飞行模式提示对象冲突。
  • 将热点提示 DccObject 名称从 airplaneTips 改为 hotspotTips
dcc-network/qml/PageWirelessDevice.qml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-bot

deepin-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

TAG Bot

New tag: 2.0.102
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #637

@wjyrich
wjyrich force-pushed the agent/bot/be276db3bc81 branch from d1231f3 to 94c3e12 Compare September 23, 2026 01:06
@wjyrich
wjyrich marked this pull request as ready for review September 23, 2026 01:07

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

1. Add airplaneItem binding in NetworkMain.qml PageWirelessDevice delegate
2. Rename duplicate DccObject from airplaneTips to hotspotTips in PageWirelessDevice.qml
3. Fix visible condition that was always false due to null airplaneItem

Log: Show airplane mode tips when airplane mode is enabled on wireless page

Influence:
1. Enable airplane mode and check wireless network page shows tips text
2. Enable hotspot and check wireless network page shows hotspot tips text
3. Verify no DccObject name conflict between airplane and hotspot tips

fix: 修复飞行模式下无线网络页面缺少提示文案

1. 在 NetworkMain.qml 的 PageWirelessDevice delegate 中补充 airplaneItem 绑定
2. 将 PageWirelessDevice.qml 中重复的 DccObject 从 airplaneTips 重命名为 hotspotTips
3. 修复因 airplaneItem 为 null 导致 visible 条件永远为 false 的问题

Log: 飞行模式开启时无线网络页面显示提示文案

Influence:
1. 开启飞行模式后检查无线网络页面是否显示提示文案
2. 开启热点后检查无线网络页面是否显示热点提示文案
3. 验证飞行模式和热点提示 DccObject 无重名冲突

PMS: BUG-378165
@wjyrich
wjyrich force-pushed the agent/bot/be276db3bc81 branch from 94c3e12 to 2d7f0b0 Compare September 24, 2026 02:03
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: caixr23, wjyrich

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 100 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 总体评分 100 分,大于 70 分通过阈值,代码质量符合要求。本次变更为单行 QML 属性绑定修复,修复了飞行模式下无线网络页面缺少提示文案的问题,代码正确且无安全漏洞。

🔍 详细分析

1. 语法逻辑 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 语法正确,逻辑清晰。QML 属性绑定语法 airplaneItem: dccData.root 正确无误,dccData.root 是对根 DCC 数据对象的有效引用,绑定位置正确位于 PageWirelessDevice delegate 块内。


2. 代码质量 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 代码结构清晰,注释完整。单行变更最小化修改,目标明确,遵循现有代码模式(与上方 netItem: model.item 一致),无代码重复。


3. 代码性能 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 性能良好,资源使用合理。QML 属性绑定由 Qt 引擎高效处理,无算法复杂度问题,无资源泄漏。


4. 代码安全 🔒

评价: 优秀 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: 存在0个安全漏洞,安全合规。本次变更不涉及用户输入处理、网络操作、文件系统访问或命令执行,无安全风险。


💡 改进建议代码示例

// 本次变更为单行 QML 属性绑定修复,代码正确无误,无需改进示例
// 变更内容:在 PageWirelessDevice delegate 中添加 airplaneItem: dccData.root
// 修复了 airplaneItem 始终为 null 导致飞行模式提示文案不显示的问题

本报告由 AI 代码审查工具自动生成

@wjyrich
wjyrich merged commit f3be479 into master Sep 24, 2026
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants