Repository navigation
Conversation
…emanager 1. Add null check after dynamic_cast<DStyle*> in DriverHeaderView::sectionSizeHint to prevent SIGSEGV in non-DStyle environments 2. Remove erroneous * 10 multiplication on progress value in setBackingUpDriverUI so progress bar shows correct percentage 3. Null out layout member pointers after delete in hideAll() to prevent dangling pointers 4. Reorder destructor to delete child layout before parent and unify on DELETE_PTR to prevent use-after-free Log: driver backup progress bar now shows correct percentage; app no longer crashes on exit Influence: 1. Verify driver backup progress bar displays 0-100% correctly 2. Verify app exits cleanly after switching between detect/download/install/backup UI states 3. Verify header column width renders correctly in normal DStyle environment fix: 修复设备管理器空指针崩溃、进度值越界及析构顺序错误 1. 在 DriverHeaderView::sectionSizeHint 中为 dynamic_cast<DStyle*> 添加判空保护,防止非 DStyle 环境下段错误 2. 移除 setBackingUpDriverUI 中对进度值错误的 ×10 乘法,使进度条显示正确百分比 3. 在 hideAll() 中 delete 布局后立即将成员指针置空,防止悬空指针 4. 调整析构函数删除顺序,子布局先于父布局释放,并统一使用 DELETE_PTR,防止 use-after-free Log: 驱动备份进度条现在显示正确百分比;应用退出时不再崩溃 Influence: 1. 验证驱动备份进度条正确显示 0-100% 2. 验证在检测/下载/安装/备份 UI 状态间反复切换后应用正常退出 3. 验证正常 DStyle 环境下表头列宽渲染正常
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos 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 guide (collapsed on small PRs)Reviewer's GuideThe PR hardens device-manager UI lifecycle handling by preventing null-style crashes, correcting backup progress percentages, and fixing layout deletion order and pointer cleanup to avoid dangling-pointer and shutdown failures. Sequence diagram for safe device-manager UI state switchingsequenceDiagram
participant UI as DeviceManagerUI
participant Layout as QLayout
participant Widget as DetectedStatusWidget
UI->>Widget: hideAll()
Widget->>Layout: delete this.layout()
Widget->>Widget: clear layout member pointers
Widget->>Layout: create replacement layouts
UI->>Widget: switch to detect, download, install, or backup UI
Sequence diagram for corrected driver backup progresssequenceDiagram
participant Backup as DriverBackup
participant UI as DetectedStatusWidget
participant Progress as QProgressBar
Backup->>UI: setBackingUpDriverUI(progressValue, totalValue, driverDescription)
UI->>Progress: setValue(progressValue)
Progress-->>UI: display progress from 0 to 100
Flow diagram for null-safe header style sizingflowchart TD
Start[sectionSizeHint] --> Cast["dynamic_cast<DStyle *>(DApplication::style())"]
Cast --> Check{DStyle available?}
Check -->|No| Warn[Log warning and return 0]
Check -->|Yes| Metric[Read pixelMetric and calculate column width]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例本次变更已经是正确的修复方式,无需额外修改代码示例。本报告由 AI 代码审查工具自动生成 |
|
TAG Bot New tag: 6.0.75 |
fix: add null check, fix progress value and destructor order in devicemanager
Log: driver backup progress bar now shows correct percentage; app no longer crashes on exit
Influence:
fix: 修复设备管理器空指针崩溃、进度值越界及析构顺序错误
Log: 驱动备份进度条现在显示正确百分比;应用退出时不再崩溃
Influence:
Summary by Sourcery
Stabilize device manager UI rendering, progress reporting, and cleanup behavior.
Bug Fixes:
Enhancements: