Skip to content

fix: Remove return statement in recoverFile function#373

Merged
lzwind merged 2 commits intolinuxdeepin:masterfrom
dengzhongyuan365-dev:master
Jul 16, 2025
Merged

fix: Remove return statement in recoverFile function#373
lzwind merged 2 commits intolinuxdeepin:masterfrom
dengzhongyuan365-dev:master

Conversation

@dengzhongyuan365-dev
Copy link
Contributor

@dengzhongyuan365-dev dengzhongyuan365-dev commented Jul 16, 2025

fix: Remove return statement in recoverFile function

  • Removed the return statement for recovered files count in StartManager::recoverFile to prevent unintended behavior.

log: Remove return statement in recoverFile function

bug:https://pms.uniontech.com/bug-view-324727.html

Summary by Sourcery

Remove premature return in recoverFile to ensure all files are processed and bump deepin-editor package version to 6.5.31.1 across manifests.

Bug Fixes:

  • Remove unintended return statement in StartManager::recoverFile to prevent premature exit and ensure complete file recovery.

Build:

  • Update deepin-editor package version to 6.5.31.1 in arm64, loong64, and main YAML manifests.

Documentation:

  • Update debian/changelog for the recoverFile fix and version bump.

- Removed the return statement for recovered files count in StartManager::recoverFile to prevent unintended behavior.

log: Remove return statement in recoverFile function

bug:https://pms.uniontech.com/bug-view-324727.html
 - update version to 6.5.31

 log: update version to 6.5.31
@github-actions
Copy link

TAG Bot

TAG: 6.5.31
EXISTED: no
DISTRIBUTION: unstable

@sourcery-ai
Copy link

sourcery-ai bot commented Jul 16, 2025

Reviewer's Guide

This PR fixes a bug in StartManager::recoverFile by removing an unintended early return so that all files are processed, and synchronizes the package’s version bump (6.5.31.1) across YAML manifests and the Debian changelog.

Class diagram for StartManager::recoverFile modification

classDiagram
    class StartManager {
        +int recoverFile(Window *window)
    }
    %% The method recoverFile previously had a 'return recFilesSum;' statement that was removed.
    %% Now, recoverFile no longer returns early, ensuring all files are processed.
Loading

File-Level Changes

Change Details Files
Removed premature return in recoverFile to prevent unintended early exit
  • Deleted the 'return recFilesSum;' statement in StartManager::recoverFile
src/startmanager.cpp
Bumped package version to 6.5.31.1 in YAML manifests
  • Updated version field from 6.5.30.1 to 6.5.31.1
arm64/linglong.yaml
linglong.yaml
loong64/linglong.yaml
Updated Debian changelog for new release
  • Adjusted changelog entry to reflect version bump and fix description
debian/changelog

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. startmanager.cpp文件中,recoverFile函数的末尾删除了return recFilesSum;语句。这个改动可能会影响函数的返回值,需要确认这是否是预期的行为。如果这个函数的目的是返回恢复的文件数量,那么删除这个返回语句可能会导致调用者无法获取到正确的恢复文件数量。

  2. changelog文件中,新增了一个修复项,提到了移除了recoverFile函数中的return语句。这个修复项应该有相应的测试用例来验证修复后的行为是否符合预期。

  3. linglong.yaml文件中,所有架构的linglong.yaml文件都更新了版本号。这个改动是合理的,但需要确保版本号的更新与实际的功能改动相匹配。

  4. loong64/linglong.yaml文件中,linglong.yaml文件的权限被修改为100755。这个改动需要确认是否有特定的原因,因为通常100644是文件的默认权限。

  5. 代码中没有发现明显的语法或逻辑错误,但是建议在recoverFile函数中添加注释来解释为什么删除了return语句,以及这个改动对函数行为的影响。

  6. 代码风格和格式需要保持一致,例如在recoverFile函数中,qDebugqInfo的输出应该有统一的格式,以便于阅读和维护。

  7. 如果recoverFile函数的返回值是重要的,建议添加单元测试来验证函数在不同情况下的返回值是否正确。

  8. changelog文件中,提交信息应该更加详细,包括修复的具体问题、修复的代码位置以及修复的原因。这有助于其他开发者理解这次提交的目的和背景。

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @dengzhongyuan365-dev - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dengzhongyuan365-dev, lzwind

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

Details 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

@lzwind lzwind merged commit 409a450 into linuxdeepin:master Jul 16, 2025
19 of 21 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.

3 participants