Skip to content

fix(personalization): remove unreliable 2x2 image for wallpaper dark …#3313

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
mhduiy:2x2wallpaper
Jun 24, 2026
Merged

fix(personalization): remove unreliable 2x2 image for wallpaper dark …#3313
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
mhduiy:2x2wallpaper

Conversation

@mhduiy

@mhduiy mhduiy commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

…type detection

Remove the 2x2 Image component and grabToImage logic used to detect wallpaper dark/light type, as it is unreliable and impacts wallpaper loading performance. Pass a hardcoded isDarkType value as a temporary placeholder.

删除用于检测壁纸深色/浅色类型的 2x2 Image 组件和 grabToImage 逻辑,
因为该方案不可靠且影响壁纸加载性能。暂时硬编码 isDarkType 值作为占位。

Log: remove unreliable 2x2 image for wallpaper dark type detection to improve loading performance

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

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

Please try again later or upgrade to continue using Sourcery

robertkill
robertkill previously approved these changes Jun 24, 2026
…type detection

Remove the 2x2 Image component and grabToImage logic used to detect
wallpaper dark/light type, as it is unreliable and impacts wallpaper
loading performance. Pass a hardcoded isDarkType value as a temporary
placeholder.

删除用于检测壁纸深色/浅色类型的 2x2 Image 组件和 grabToImage 逻辑,
因为该方案不可靠且影响壁纸加载性能。暂时硬编码 isDarkType 值作为占位。

Log: remove unreliable 2x2 image for wallpaper dark type detection to improve loading performance
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:100分

■ 【总体评价】

代码彻底移除了使用2x2像素缩略图判断壁纸明暗的严重逻辑缺陷,清理了无效的调用链路
逻辑正确、代码清理彻底且提升了运行性能,无任何扣分项

■ 【详细分析】

  • 1.语法逻辑(正确)✓

修改准确移除了从QML层到C++底层的isDark参数传递链路,包括信号定义、槽函数声明与实现,所有调用点的参数对齐无遗漏
建议:无需额外修改

  • 2.代码质量(优秀)✓

删除了完全无效且误导的ImageHelper类及QML中的img2x2控件,同时清理了X11Worker中遗留的Q_UNUSED(isDark)宏,代码更加精简和符合规范
建议:无需额外修改

  • 3.代码性能(高效)✓

移除了QML中grabToImage的异步图像抓取操作以及C++中无意义的像素遍历计算,消除了设置壁纸时的额外性能开销
建议:无需额外修改

  • 4.代码安全(存在0个安全漏洞)✓

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
本次修改为纯逻辑缺陷修复与冗余代码清理,不涉及敏感操作、权限变更或外部输入处理,未引入任何安全风险

  • 建议:保持当前的代码清理状态

■ 【改进建议代码示例】

// 当前diff已完美修复该逻辑缺陷,无需额外代码示例
// 修复核心在于移除WallpaperSelectView.qml中的img2x2控件及grabToImage调用
// 并将整条setWallpaperForMonitor调用链中的isDark参数彻底剔除

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mhduiy, robertkill

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

@mhduiy

mhduiy commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot deepin-bot Bot merged commit 3cbdb17 into linuxdeepin:master Jun 24, 2026
17 of 19 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