Skip to content

fix: DTipLabel文本默认对齐方式#653

Closed
shao-jun wants to merge 1 commit intolinuxdeepin:masterfrom
shao-jun:master-fork
Closed

fix: DTipLabel文本默认对齐方式#653
shao-jun wants to merge 1 commit intolinuxdeepin:masterfrom
shao-jun:master-fork

Conversation

@shao-jun
Copy link
Contributor

DTipLabel的尺寸

Log:
Influence: DAlertControl
Change-Id: I251400365fc6fdc29ee1cb1f11efdc81eaf2d939

 DTipLabel的尺寸

Log:
Influence: DAlertControl
Change-Id: I251400365fc6fdc29ee1cb1f11efdc81eaf2d939
@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shao-jun

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
Contributor

deepin pr auto review

关键摘要:

  • DAlertControl 类中的 setMessageAlignmentmessageAlignment 方法被重命名为 setAlertAlignmentalertAlignment,但注释和实现中仍然保留了对 setMessageAlignment 的引用,可能会导致混淆。
  • DLineEdit 类中新增的 setAlertAlignmentalertAlignment 方法直接调用 DAlertControl 类的同名方法,但没有检查 d->control 是否为空,可能会导致空指针异常。
  • DTipLabelPrivate 类的构造函数中注释掉了 q->setAlignment(Qt::AlignCenter);,但这个设置可能会影响 DTipLabel 的默认对齐方式。

是否建议立即修改:

  • 应该立即修正 DAlertControl 类中的方法命名和注释,确保一致性。
  • DLineEdit 类中添加对 d->control 是否为空的检查,以避免潜在的空指针异常。
  • 如果 DTipLabel 的默认对齐方式需要保持为 Qt::AlignCenter,应该恢复 q->setAlignment(Qt::AlignCenter); 的设置,并确保这一行为符合设计意图。

deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Apr 16, 2025
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#653
@shao-jun shao-jun closed this Apr 16, 2025
@shao-jun shao-jun deleted the master-fork branch April 16, 2025 08:09
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