Skip to content

feat: Merge from release/1071#186

Merged
deepin-bot[bot] merged 6 commits intolinuxdeepin:masterfrom
wangrong1069:pr1219-2
Dec 19, 2025
Merged

feat: Merge from release/1071#186
deepin-bot[bot] merged 6 commits intolinuxdeepin:masterfrom
wangrong1069:pr1219-2

Conversation

@wangrong1069
Copy link
Contributor

No description provided.

itsXuSt and others added 6 commits December 19, 2025 14:47
Changes:
1. Added real-time tracking for elapsed time during disk checks.
2. Implemented pause functionality to accurately account for time spent paused.
3. Updated progress calculation based on actual elapsed time.

Log: Improved time management for disk sector checks, providing a more accurate user experience.

Bug: https://pms.uniontech.com/bug-view-324195.html
Changes:
1. Added a condition to disable the bad sector detection feature for SSD devices in the device list widget.

Log: Improved user experience by preventing unnecessary checks on SSDs.

Bug: https://pms.uniontech.com/bug-view-327485.html
only shows USF and hide the versions.

Log: as above.

Task: https://pms.uniontech.com/task-view-382543.html
…e compatibility

- Remove hardcoded DPalette definitions (palette1-6) in DiskHealthDetectionDialog
- Remove all setPalette() calls that prevented theme color following
- Use option.palette.color(QPalette::Text) in DiskHealthDetectionDelegate for dynamic theme color
- Preserve semantic colors for health status indicators (good/damaged/unknown)

Log: Fix disk health panel font color not following dark mode theme
Bug: https://pms.uniontech.com/bug-view-341105.html
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry @wangrong1069, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot
Copy link

deepin pr auto review

我来对这个diff进行代码审查:

  1. .gitignore修改:
  • 将.claude/*从AI部分移除,这是合理的,因为它可能不是真正的AI工具相关文件
  1. devicelistwidget.cpp:
  • 添加了对SSD设备的检查,禁用坏道检测功能,这是合理的改进,因为SSD不需要坏道检测
  1. diskbadsectorsdialog.cpp和.h:
  • 时间跟踪改进:
    • 添加了实际时间跟踪机制(m_realStartTime, m_pauseStartTime等)
    • 改进了进度计算方式,使用实际检测数量而不是时间
    • 优化了剩余时间的计算逻辑
    • 添加了暂停状态的处理

优点:

  • 更准确的时间计算
  • 更合理的进度显示
  • 更好的暂停/继续功能支持

建议改进:

  1. 时间计算相关的变量应该添加注释说明单位(毫秒)

  2. 可以考虑将时间计算逻辑抽取为单独的工具类

  3. 在onCheckTimeOut()中,realElapsedTime < 0的检查是好的,但应该记录日志而不是简单置0

  4. diskhealthdetectiondelegate.cpp:

  • 将硬编码的颜色改为使用系统调色板(option.palette.color(QPalette::Text)),这是好的改进,提高了主题适配性
  1. diskhealthdetectiondialog.cpp:
  • 移除了多个硬编码的调色板设置,改用系统默认样式
  • 简化了代码结构,提高了可维护性
  1. DeviceStorage.cpp:
  • UFS版本判断简化:将多个具体版本判断合并为统一的"UFS"标识
  • updateForHWDevice()改进:
    • 修改了设备检查逻辑
    • 添加了磁盘大小标准化处理
    • 实现了更合理的容量显示(256GB、512GB等标准容量)

建议改进:

  1. 磁盘大小标准化逻辑可以抽取为单独的工具函数
  2. 容量判断阈值(200GB, 300GB等)应该定义为常量
  3. 对于容量标准化,建议考虑添加日志记录,方便调试

总体评价:
这些改动主要是功能优化和代码重构,提高了软件的可靠性和用户体验。主要改进包括:

  1. 更准确的时间计算
  2. 更好的主题适配
  3. 更合理的设备信息显示
  4. 更规范的代码结构

建议后续改进:

  1. 添加更多的单元测试,特别是时间计算相关的逻辑
  2. 考虑添加错误处理机制
  3. 对于关键逻辑添加更多注释
  4. 将一些常量值定义为宏或常量变量

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lzwind, wangrong1069

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

@wangrong1069
Copy link
Contributor Author

/merge

@deepin-bot deepin-bot bot merged commit ae4bb9f into linuxdeepin:master Dec 19, 2025
17 checks passed
@wangrong1069 wangrong1069 deleted the pr1219-2 branch December 19, 2025 08:50
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.

4 participants