Skip to content

fix(backlight): replace Q_ASSERT with error handling and guard division by zero#1091

Open
deepin-wm wants to merge 1 commit into
linuxdeepin:masterfrom
deepin-wm:fix/backlight-error-handling
Open

fix(backlight): replace Q_ASSERT with error handling and guard division by zero#1091
deepin-wm wants to merge 1 commit into
linuxdeepin:masterfrom
deepin-wm:fix/backlight-error-handling

Conversation

@deepin-wm

Copy link
Copy Markdown
Contributor

Q_ASSERT crashes in release builds. Replace with proper error handling that logs warnings and returns safely. Add division-by-zero guard in brightness() for the case where max_brightness is invalid.

Extracted from #1046. Ref: WM-29

@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 @deepin-wm, 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
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-wm

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-wm deepin-wm force-pushed the fix/backlight-error-handling branch from 8a9e1ff to 34f5a53 Compare July 2, 2026 11:18
…on by zero

Q_ASSERT crashes in release builds. Replace with proper error handling
that logs warnings and returns safely. Add division-by-zero guard in
brightness() for the case where max_brightness is invalid.

WM-29
@deepin-wm deepin-wm force-pushed the fix/backlight-error-handling branch from 34f5a53 to 4e31b95 Compare July 2, 2026 11:25
@deepin-bot

deepin-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

TAG Bot

New tag: 0.8.14
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #1123

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.

2 participants