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: [editor] Fixed an issue where documents could not be synchronized #884

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

Kakueeen
Copy link
Contributor

as title

Log: fix issue

@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • TabWidgetPrivate::createEditor函数中,增加了对doc参数的检查和处理,确保在打开文件时提供正确的文档。
  • TextEditor::openFileWithDocument函数被重命名为openFile,以符合现有的命名约定。
  • TextEditor::openFile函数增加了对文件打开时文档参数的检查,确保文档正确传递。
  • TextEditor::save函数中移除了对fileSaved信号的发射,因为这可能导致循环发送信号。
  • TextEditor::reload函数中移除了对fileSaved信号的发射,因为这可能导致循环发送信号。
  • TextEditor::addBreakpointTextEditor::findUsageTextEditor::renameSymbol函数中移除了对fileSaved信号的发射,因为这可能导致循环发送信号。
  • WorkspaceWidgetPrivate::doSplit函数中增加了对fromTW参数的检查,确保来源的TabWidget存在。
  • WorkspaceWidgetPrivate::onSplitRequested函数中,将doSplit函数的参数从spliter, index, fileName, cursorPos, scroll更改为tabWidgetSender, spliter, index, fileName,以匹配新的doSplit函数签名。

是否建议立即修改:

这些修改主要是为了修复潜在的循环信号发送问题,确保信号只在适当的时候被发送,避免可能的性能问题和逻辑错误。此外,这些修改也提高了代码的可读性和一致性,符合Qt和整个项目中的命名约定。

@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 deepin-mozart 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 2861f4f into linuxdeepin:master Aug 12, 2024
6 of 7 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