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: Fixed an issue with editor document synchronization #900

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

Kakueeen
Copy link
Contributor

@Kakueeen Kakueeen commented Sep 3, 2024

If newly opened files are already open in other tabwidgets, their content changes are not synchronized

Log: fix issue

If newly opened files are already open in other tabwidgets, their content changes are not synchronized

Log: fix issue
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • handleOpenFile函数中,使用findEditor方法查找打开的文件可能导致性能问题,特别是当文件数量较多时。
  • handleOpenFile函数中,对editor的赋值和初始化应该放在循环外部,以避免每次循环都创建新的TextEditor对象。
  • handleOpenFile函数中,应该检查document是否为nullptr,以避免在文档为空时调用setDocument方法。
  • handleOpenFile函数中,应该检查fileName是否已经存在于tabWidgetList中,以避免重复打开文件。

是否建议立即修改:

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Kakueeen, LiHua000
Once this PR has been reviewed and has the lgtm label, please assign toberyan for approval. For more information see the Code Review Process.

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-mozart deepin-mozart merged commit 1e5f38a into linuxdeepin:master Sep 4, 2024
16 of 17 checks passed
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