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: onPressedLineNumber() may cause process hangs. #259

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

rb-union
Copy link
Contributor

点击序号列空白处,可能导致程序阻塞,这是由于循环判断
没有检查 QTextBlock 是否有效。

  1. 修改 onPressedLineNumber() 函数,改为使用 cursorForPosition() 接口取得块位置,而非循环比对块区域范围。
  2. 补充 onPressedLineNumber() 的单元测试。

Log: 修复一次点击序号可能导致程序阻塞的问题
Bug: https://pms.uniontech.com/bug-view-215591.html
Influence: LineNumber

点击序号列空白处,可能导致程序阻塞,这是由于循环判断
没有检查 QTextBlock 是否有效。
1. 修改 onPressedLineNumber() 函数,改为使用 cursorForPosition()
接口取得块位置,而非循环比对块区域范围。
2. 补充 onPressedLineNumber() 的单元测试。

Log: 修复一次点击序号可能导致程序阻塞的问题
Bug: https://pms.uniontech.com/bug-view-215591.html
Influence: LineNumber
@rb-union
Copy link
Contributor Author

/reivew @starhcq

@starhcq
Copy link
Contributor

starhcq commented Aug 29, 2023

/+1

Copy link
Contributor

@starhcq starhcq left a comment

Choose a reason for hiding this comment

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

/+1

@starhcq starhcq merged commit d093512 into linuxdeepin:master Aug 29, 2023
13 checks passed
@rb-union rb-union deleted the fix_215591_hang branch August 29, 2023 08:49
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rb-union, starhcq

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

rb-union added a commit to rb-union/deepin-editor that referenced this pull request Aug 31, 2023
Update version to 6.0.12
PR:
* linuxdeepin#259

Log: Update version to 6.0.12
starhcq pushed a commit that referenced this pull request Aug 31, 2023
Update version to 6.0.12
PR:
* #259

Log: Update version to 6.0.12
rb-union added a commit to rb-union/deepin-editor that referenced this pull request Aug 20, 2024
Update version to 6.0.12
PR:
* linuxdeepin#259

Log: Update version to 6.0.12
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