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: 部分设备接口信息显示为UFS31 #320

Merged
merged 1 commit into from
May 27, 2024

Conversation

jeffshuai
Copy link

部分UFS设备接口信息显示为UFS31

Log: 部分UFS设备接口信息显示为UFS31

Bug: https://pms.uniontech.com/bug-view-251373.html

 部分UFS设备接口信息显示为UFS31

Log:  部分UFS设备接口信息显示为UFS31

Bug: https://pms.uniontech.com/bug-view-251373.html
Copy link
Contributor

@rb-union rb-union left a comment

Choose a reason for hiding this comment

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

[是否满足兼容性要求] Y
[是否满足commit提交规范] Y
[是否满足编码规范] Y
[Review结论] Pass
[Fail原因] N/A

wyu71
wyu71 previously approved these changes May 23, 2024
Copy link
Contributor

@wyu71 wyu71 left a comment

Choose a reason for hiding this comment

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

/+

@jeffshuai
Copy link
Author

/merge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented May 23, 2024

This pr cannot be merged! (status: unstable)

@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • DeviceStorage.cpp文件中,#include <QDir>被添加在了#include "commonfunction.h"之后,建议将其移动到文件顶部,以避免潜在的编译问题。
  • setHwinfoInfo函数中,mapInfo参数被用于设置logicalName变量,但没有检查mapInfo是否为空或mapInfo["SysFS ID"]是否存在,这可能会导致运行时错误。
  • blockDir对象被创建后,没有检查是否成功创建,可能会导致后续的blockfs列表为空,从而跳过循环,这可能不是预期的行为。
  • m_DeviceFile.contains方法使用了Qt::CaseInsensitive参数,但没有考虑到fsname也可能包含/字符,这可能会导致逻辑错误。
  • QFile对象file在打开文件后,没有检查是否成功打开,直接读取文件内容可能需要错误处理。
  • output2变量在后续的代码中没有被使用,也没有必要存在,应该移除。

合并相似的问题是否建议立即修改:

  • 代码中存在潜在的运行时错误和逻辑错误,这些问题可能会影响程序的正常运行,建议立即修改。
  • 代码的修改应该包括对mapInfo的检查,确保在使用之前mapInfo是有效的。
  • QDirQFile的操作应该在确认成功后才继续进行,以避免潜在的资源泄露。
  • 循环中的break语句应该放在if条件中,以避免在找到匹配的fsname后继续检查后续目录。
  • 应该添加适当的错误处理逻辑,以确保文件操作失败时程序能够正确处理。

Copy link
Contributor

@wyu71 wyu71 left a comment

Choose a reason for hiding this comment

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

/+1

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jeffshuai, max-lvs, wyu71

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

@jeffshuai
Copy link
Author

/merge

@deepin-bot deepin-bot bot merged commit 652ae46 into linuxdeepin:master May 27, 2024
30 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.

5 participants