Repository navigation
feat: convert logging calls to categorized macros (5/8) - #246
Conversation
|
Sorry @add-uos, your pull request is larger than the review limit of 150,000 diff characters |
ac0f8b0 to
a59320b
Compare
Convert uncategorized qDebug/qWarning/qInfo/qCritical calls in this part of the code to the categorized macros (appLog/serviceLog/baseLog), so the log level follows the DConfig log_rules of org.deepin.dde.diskmanager and can be switched at runtime by the debug-mode script without restart.
a59320b to
6ff4f5b
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: ['无需修改。语法和逻辑均正确。'] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: ["建议在迁移日志宏时一并修正 unmountdialog.cpp:158 的误导性日志,改为 'Unmount operation completed after user accepted warning'", "建议修正 resizedialog.cpp:350 的误导性日志,改为 'New size is below minimum capacity for LV'", "建议区分 removepvwidget.cpp 构造函数中的两条日志,如 'RemovePVWidget initializing' 和 'RemovePVWidget initialized'"] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: ['无需修改。分类日志宏是 Qt 推荐的最佳实践,可在运行时按类别控制日志级别。'] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: ['无需修改。无安全风险。'] 💡 改进建议代码示例// application/widgets/unmountdialog.cpp — 修正误导性日志消息
// 修改前(第158行附近):
// qCDebug(appLog) << "User accepted unmount warning, proceeding with unmount.";
// umountCurMountPoints();
// qCDebug(appLog) << "User canceled unmount operation"; // 误导:用户实际接受了操作
// 修改后:
// qCDebug(appLog) << "User accepted unmount warning, proceeding with unmount.";
// umountCurMountPoints();
// qCDebug(appLog) << "Unmount operation completed after user accepted warning";
// application/widgets/resizedialog.cpp — 修正误导性日志消息
// 修改前(第350行附近):
// qCWarning(appLog) << "New size exceeds maximum capacity for LV:" << vgInfo.m_vgName;
// 修改后:
// qCWarning(appLog) << "New size is below minimum capacity for LV:" << vgInfo.m_vgName;
// application/widgets/removepvwidget.cpp — 区分构造函数中的两条日志
// 修改前:
// qCDebug(appLog) << "RemovePVWidget initialized";
// initUi();
// initConnection();
// qCDebug(appLog) << "RemovePVWidget initialized";
// 修改后:
// qCDebug(appLog) << "RemovePVWidget initializing";
// initUi();
// initConnection();
// qCDebug(appLog) << "RemovePVWidget initialized";本报告由 AI 代码审查工具自动生成 |
|
TAG Bot New tag: 6.0.28 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos, lzwind 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 |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
调试模式(deepin-debug-config)适配系列拆分提交 07/10。
本 PR 为系列拆分之一:每 10 个文件一个 commit、一个 commit 一个 PR。单独编译不保证通过,系列最后一个 PR(p10,包含全部 88 个文件变更)为完整最终状态,已验证编译与功能。
完整变更说明(日志分类设计、MLogger 机制、DConfig meta、验证结果)见 #239。
配套 debug-config 侧提交见 Gerrit: change 409164(develop/snipe 分支)。
Summary by Sourcery
Convert the affected application and service logging calls to categorized Qt macros for more targeted debug logging.
Enhancements:
Build:
Chores: