Skip to content

feat: adapt deepin-debug-config for dynamic log level control (3/3) - #540

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
add-uos:feat/camera-debugsource-p3
Oct 30, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
add-uos:feat/camera-debugsource-p3

Conversation

@add-uos

@add-uos add-uos commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

概要 / Summary

适配 deepin-debug-config 调试模式(第 3 部分,共 3 部分,按每 10 个文件拆分提交)。

  • 日志分类化:src/src 下 5 个源文件(previewopenglwidget.cpp、takephotosettingareawidget.cpp、titlebar.cpp、videowidget.cpp、windowstatethread.cpp)中活跃的 qDebug()/qInfo()/qWarning() 调用转换为 qCDebug/qCInfo/qCWarning(appLog),统一使用 org.deepin.camera 分类,并补充 ddlog.h 头文件引入;注释代码保持原样
  • SPDX 版权年份更新为包含 2026

注:本 PR 为拆分提交的第 3 部分,与第 1、2 部分配合使用;文件集与前两部分无交集,无合并冲突。完整改动已整体验证:Qt6 Release 构建通过、四档日志级别实测生效。

Summary by Sourcery

Adapt the remaining camera components to centralized, dynamically controllable logging.

Enhancements:

  • Route active logging in five camera UI and window-monitoring components through the shared org.deepin.camera logging category, enabling dynamic log-level control.

Chores:

  • Update copyright notices to cover 2026.

Convert plain qDebug/qInfo/qWarning to categorized qCDebug/qCInfo/qCWarning
with org.deepin.camera category in src/src files (previewopenglwidget,
takephotosettingareawidget, titlebar, videowidget, windowstatethread), and
add ddlog.h includes.

将 src/src 下 5 个源文件的普通日志宏改为带 org.deepin.camera 分类的
qCDebug/qCInfo/qCWarning,并补充 ddlog.h 头文件引入。

Log: 适配deepin-debug-config调试模式(3/3)
Influence: 可通过deepin-debug-config动态切换deepin-camera的日志输出级别
@sourcery-ai

sourcery-ai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Sorry @add-uos, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 6 days and 4 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Reviewer's Guide

The third split commit adapts five camera UI and runtime source files to categorized DDLog logging, enabling dynamic log-level filtering through the shared appLog category, while preserving commented code and updating copyright metadata through 2026.

File-Level Changes

Change Details Files
Converted active Qt logging to the shared categorized logging API for dynamic log-level control.
  • Added ddlog.h and imported the DDLog namespace in each affected source file.
  • Replaced active qDebug, qInfo, and qWarning calls with qCDebug, qCInfo, and qCWarning using the appLog category.
  • Kept commented-out logging unchanged while covering camera preview, photo settings, video handling, title bar, and window-state monitoring paths.
src/src/previewopenglwidget.cpp
src/src/takephotosettingareawidget.cpp
src/src/titlebar.cpp
src/src/videowidget.cpp
src/src/windowstatethread.cpp
Updated source-file copyright metadata through 2026.
  • Updated legacy copyright ranges and SPDX copyright years in the affected files.
src/src/previewopenglwidget.cpp
src/src/takephotosettingareawidget.cpp
src/src/titlebar.cpp
src/src/videowidget.cpp
src/src/windowstatethread.cpp

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-ci-robot

Copy link
Copy Markdown

[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.

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


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 本次提交将5个源文件的Qt日志宏从 qDebug/qWarning/qInfo 统一替换为分类日志宏 qCDebug(appLog)/qCWarning(appLog)/qCInfo(appLog),并引入 ddlog.h 头文件与 DDLog 命名空间,实现动态日志级别控制。变更机械且一致,无语法逻辑错误,无安全漏洞,性能上分类日志支持运行时过滤反而优于原实现。代码质量良好,变更最小化且风格统一。

🔍 详细分析

1. 语法逻辑 ✅

评价: 语法正确,逻辑清晰 ✅ 通过

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

建议: []


2. 代码质量 ✅

评价: 代码结构清晰,注释完整 ✅ 通过

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

建议: []


3. 代码性能 ✅

评价: 性能良好,资源使用合理 ✅ 通过

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

建议: []


4. 代码安全 🔒

评价: 存在0个安全漏洞 ✅ 通过

🔐 发现 0 个安全漏洞

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

建议: []


💡 改进建议代码示例


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

@add-uos

add-uos commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot
deepin-bot Bot merged commit 3ba41a7 into linuxdeepin:master Oct 30, 2026
17 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