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: [computer]Getting the UUID is stuck, causing the interface to freeze #1972

Closed
wants to merge 1 commit into from

Conversation

pengfeixx
Copy link
Contributor

Put the obtained UUID into the thread for execution

Log: Fixed some known issues

…eeze

Put the obtained UUID into the thread for execution

Log: Fixed some known issues
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pengfeixx

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
Copy link

deepin pr auto review

关键摘要:

  • ComputerView::handleDisksVisible函数中,使用了QFutureWatcher来处理异步操作,但是没有对可能的异常情况进行处理。
  • 使用了new关键字分配内存但没有相应的delete来释放内存,可能会导致内存泄漏。
  • setRowHidden函数的调用可能不是线程安全的,特别是在多线程环境下,应该使用锁来保护数据。
  • ComputerItemWatcher::disksHiddenByDConf函数的调用被移除,但是相关的代码似乎没有完全移除,可能会导致未定义的行为。
  • fmInfo函数的调用被替换为qDebug,但是没有检查fmInfo是否为空或者是否能够正常工作。

是否建议立即修改:

  • 应立即添加异常处理逻辑以处理可能的异步操作异常。
  • 应该使用delete来释放QFutureWatcher分配的内存。
  • 如果在多线程环境中使用setRowHidden,应考虑使用线程安全的数据结构或锁来保护数据。
  • 需要确认ComputerItemWatcher::disksHiddenByDConf函数的移除是否正确,并且是否有其他代码替代了这部分功能。
  • 应该检查fmInfo是否为空或者是否能够正常工作,并在必要时替换为有效的日志记录机制。

Copy link
Contributor

@itsXuSt itsXuSt left a comment

Choose a reason for hiding this comment

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

获取隐藏列表的逻辑放到线程里跑,可能会导致计算机页面闪现本该隐藏的项。

@deepin-bot
Copy link
Contributor

deepin-bot bot commented May 9, 2024

TAG Bot

New tag: 6.0.50
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #1970

@pengfeixx pengfeixx closed this May 11, 2024
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