Skip to content

Conversation

@tsic404
Copy link
Contributor

@tsic404 tsic404 commented Dec 9, 2024

close popup later, beacause dock still get click event

log: as title

close popup later, beacause dock still get click event

log: as title
@tsic404 tsic404 changed the title fix: unable to hide popup click twice fix: unable to hide popup click twice on treeland Dec 9, 2024
@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. PopupWindow::mouseReleaseEvent 函数中,使用 QMetaObject::invokeMethod 替代 close() 方法,这是一个好的做法,因为它允许在事件循环的下一个回合中执行关闭操作,从而避免潜在的阻塞问题。但是,需要确保调用 close() 方法时不会导致未定义的行为,例如在关闭窗口时释放的资源。

  2. ActionLegacyTrayPluginDelegate.qml 文件中,对 plugin 对象进行了空值检查(plugin?),这是一个好的做法,可以防止在 pluginnull 时访问其属性导致崩溃。但是,应该确保在访问 plugin 的属性之前,已经进行了适当的错误处理或默认值设置。

  3. PluginItem.qml 文件中,对 traySurface 对象进行了空值检查,并使用三元运算符来设置 fallbackIconSize。这是一个合理的做法,可以避免在 traySurfacenull 时访问其属性导致崩溃。但是,三元运算符的使用可能会导致代码的可读性降低,建议使用更明确的条件语句来提高代码的可读性。

总体来说,这些修改提高了代码的健壮性和可读性,但是需要确保在访问对象属性之前进行了适当的空值检查和错误处理。

@tsic404
Copy link
Contributor Author

tsic404 commented Dec 9, 2024

/forcemerge

@deepin-bot
Copy link

deepin-bot bot commented Dec 9, 2024

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit 41e5dbe into linuxdeepin:master Dec 9, 2024
7 of 10 checks passed
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, tsic404, yixinshark

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

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.

4 participants