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: [DirectoryAsynParse] Program crash #1036

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

Kakueeen
Copy link
Contributor

@Kakueeen Kakueeen commented Jan 3, 2025

QStandItem is not thread-safe, and operating on the QStandItem object in the thread causes the program to crash

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

QStandItem is not thread-safe, and operating on the QStandItem object in the thread causes the program to crash

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

deepin pr auto review

关键摘要:

  • 移除了rootItem成员变量,改为使用itemList来存储所有项目项,这可能会影响现有代码中对rootItem的依赖。
  • DirectoryAsynParse构造函数中移除了对root参数的处理,这可能会影响外部调用该构造函数时的行为。
  • parseProject方法中,emit itemsCreated(d->itemList);可能会改变信号发射的语义,需要确认是否所有接收者都支持新的信号参数。
  • doDirectoryChanged方法中,注释掉了原有的更新逻辑,改为发射reqUpdateItem信号,这可能会影响依赖于旧逻辑的其他代码。
  • createRows方法中,将itemList用于存储项目项,而不是rootItem,这可能会改变项目项的添加方式。
  • findItemfindParentItem方法中,移除了对rootItem的依赖,改为使用itemList,这可能会影响这些方法的行为。
  • sortItems方法中,移除了对rootItem的依赖,改为直接对itemList进行排序,这可能会改变排序逻辑。
  • DirectoryGenerator类中,移除了对itemsModified信号的连接,改为连接到itemsCreated信号,这可能会影响项目生成逻辑。
  • handleItemUpdated方法中,移除了对itemUpdated信号的连接,改为连接到reqUpdateItem信号,并添加了新的逻辑来更新项目项,这可能会改变项目项的更新方式。

是否建议立即修改:

  • 需要确认所有修改后的逻辑是否与原有代码的行为一致,并确保所有相关的信号和槽函数都已正确更新。
  • 需要测试修改后的代码,确保没有引入新的错误或性能问题。
  • 需要检查是否有其他代码依赖于rootItem,并确保这些代码能够正确处理itemList的使用。
  • 需要更新相关的文档和注释,以反映这些更改。

@deepin-mozart deepin-mozart merged commit 645bb7a into linuxdeepin:master Jan 6, 2025
9 of 10 checks passed
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deepin-mozart, Kakueeen

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

The pull request process is described 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants