Skip to content

Conversation

@add-uos
Copy link
Contributor

@add-uos add-uos commented Nov 28, 2025

pick develop/eagle to master

remove useless info.

pick from: linuxdeepin@e675774

Log: remove useless info.
Task: https://pms.uniontech.com/task-view-377197.html
Change-Id: I38069249ec2ad433e5401a921347d36ae06320c2
adjust the storage display order.

pick from: linuxdeepin@af46605

Log: adjust the storage display order.
Task: https://pms.uniontech.com/task-view-377189.html
Change-Id: Id1d49719127fb01e61e05ec7cdd2743823068b54
Update device description to fixed value "Universal Flash Storage".

Log: Update device description to fixed value "Universal Flash Storage"
Bug: https://pms.uniontech.com/bug-view-315353.html
Change-Id: Id04f0cf6666fd50496e95e8b631c8598e0c632cb
add the detail mode of screen size. extend the screen size.

Log: add the detail mode of screen size
Bug: https://pms.uniontech.com/bug-view-318561.html
Change-Id: I1e51351fffe4b79e6db0050b1c5c9ced9828dd1d
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.

Sorry @add-uos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot
Copy link

deepin pr auto review

我来对这段代码变更进行详细审查:

  1. 代码逻辑改进:
  • 在 DeviceBios.cpp 中,注释掉了 "Chassis Handle" 和 "Contained Object Handles" 的过滤键。这些更改可能是为了减少不必要的信息显示,但建议添加注释说明原因。
  • DeviceCpu.cpp 中注释掉了 CPU ID、Core ID 和 BogoMIPS 的显示,这可能是出于安全考虑,但同样建议添加注释说明。
  • DeviceCpu.cpp 中新增了对特殊机型(specialComType > 0)的 Version 信息处理,这个改动合理,但建议将 specialComType 的具体值定义为常量。
  1. 代码性能改进:
  • DeviceManager.cpp 中新增的 orderDiskByType() 函数使用了 lambda 表达式进行自定义排序,代码简洁高效。
  • DeviceStorage.cpp 中新增了 mediaType() 和 interface() 的 getter 方法,返回 const 引用,避免了不必要的拷贝。
  1. 代码安全改进:
  • 在 DeviceStorage.cpp 中,移除了对 specialComType == 5 的特殊判断,改为通用的处理方式,提高了代码的普适性。
  • EDIDParser.cpp 中增加了对屏幕尺寸的更精确计算,提高了数据准确性。
  1. 代码质量建议:
  • 建议在所有注释掉的代码处添加详细的注释说明原因。
  • specialComType 的判断应该使用枚举或常量定义,而不是魔法数字。
  • orderDiskByType() 函数中的比较逻辑较为复杂,建议拆分成更小的函数提高可读性。
  • 建议在 DeviceStorage::getOverviewInfo() 中对 m_Interface 和 m_MediaType 进行空值检查。
  1. 其他建议:
  • 在 DeviceManager.h 中新增的 orderDiskByType() 函数声明应该添加更详细的文档注释。
  • DeviceGenerator.cpp 中调用 orderDiskByType() 的位置合理,但建议添加错误处理。
  • EDIDParser.cpp 中的屏幕尺寸计算逻辑可以提取为独立函数,便于测试和维护。

总体来说,这些改动主要针对设备信息的显示和排序逻辑进行了优化,提高了代码的可维护性和用户体验。但建议增加更多的注释和错误处理,并使用常量替代魔法数字。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: add-uos, 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

@add-uos
Copy link
Contributor Author

add-uos commented Nov 28, 2025

/forcemerge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Nov 28, 2025

This pr cannot be merged! (status: unstable)

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Nov 28, 2025

This pr force merged! (status: unstable)

@deepin-bot deepin-bot bot merged commit 5b6a051 into linuxdeepin:master Nov 28, 2025
15 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.

3 participants