Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wrong status of switch button #609

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FeiWang1119
Copy link
Contributor

correct the wrong initial status of switch button

Bug: https://pms.uniontech.com/bug-view-276221.html
Log:

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: FeiWang1119

The full list of commands accepted by this bot can be found here.

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 added a commit to linuxdeepin/dtk6widget that referenced this pull request Oct 8, 2024
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#609
correct the wrong initial status of switch button

Bug: https://pms.uniontech.com/bug-view-276221.html
Log:
@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

关键摘要:

  • checkStateSet私有函数中,D_D(DSwitchButton)的调试信息应该在编译时进行条件编译以避免潜在的性能问题。
  • DDciIcon::fromTheme("switch_on")DDciIcon::fromTheme("switch_off")的调用可能需要检查图标主题的可用性,以避免在某些情况下导致程序崩溃。
  • d->player.setIcon(icon)可能会导致内存泄漏,如果d->player在设置图标后不再被使用,应该在不再需要图标时删除它。

是否建议立即修改:

deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Oct 8, 2024
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#609
@deepin-bot
Copy link
Contributor

deepin-bot bot commented Oct 8, 2024

Doc Check bot
🟢 Document Coverage Check Passed!

if (isChecked() == d->checked) {
return;
}
d->checked = isChecked();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

跟下面的toggle 有共同部分,可以提取出来,

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