Skip to content

pick develop/eagle to master#573

Merged
deepin-bot[bot] merged 5 commits intolinuxdeepin:masterfrom
add-uos:master
Dec 1, 2025
Merged

pick develop/eagle to master#573
deepin-bot[bot] merged 5 commits intolinuxdeepin:masterfrom
add-uos:master

Conversation

@add-uos
Copy link
Contributor

@add-uos add-uos commented Dec 1, 2025

pick develop/eagle to master

add-uos and others added 5 commits December 1, 2025 15:07
…able

Fixed typo in method name across both declaration and implementation to
ensure consistent and correct spelling for the device enablement control
function.

Log: Fix method name spelling error
Change-Id: I4f67de86de7fc774495a00fb46cd3eb7c394b128
Fixed typos in method name and variable comments to ensure consistent
and correct spelling:
- Changed parserVendor() to parseVendor() across both declaration and
implementation
- Fixed "heigth" to "height" in method comments and variable
descriptions

pick from: linuxdeepin@d3ea819

Log: Fix spelling errors in EDID parser
Change-Id: Ia15db2bf96f2e145718981592e69dca3e740172c
Replaced detailed UFS version parsing (3.0/3.1/4.0)
with generic "UFS" identifier when output is non-empty,
streamlining interface detection logic.

pick from: linuxdeepin@a0b7831

Log: Streamline UFS interface detection
Task: https://pms.uniontech.com/task-view-382541.html
Change-Id: Ia1a80391d0291e3de69723630ae17029fadd2eb1
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

lzwind
lzwind previously approved these changes Dec 1, 2025
@deepin-ci-robot
Copy link

deepin pr auto review

我来对这个git diff进行代码审查:

  1. main.cpp 修改:
if (getGpuMemInfoForFTDTM(mapInfo)) {

改进建议:

  • 这个改动移除了对getGpuBaseInfo的调用,可能会导致GPU基础信息丢失
  • 建议保留两个函数的调用,或者确保getGpuMemInfoForFTDTM内部包含了基础信息的获取
  1. deviceinterface.cpp 修改:
QString DeviceInterface::getGpuInfoByCustom(const QString &cmd, const QStringList &arguments)

改进建议:

  • 移除了静态缓存(firstFlag和gpuinfo),这可能导致性能下降,因为每次调用都会重新执行命令
  • 移除了waitForFinished的超时时间(4000ms),这可能导致进程无限等待
  • 建议恢复超时时间设置,并考虑重新实现缓存机制
  1. DeviceInfo.cpp/h 修改:
void DeviceBaseInfo::setCanEnable(bool can)

改进建议:

  • 修复了拼写错误(Enale->Enable),这是好的改动
  • 建议检查所有调用这个函数的地方,确保命名一致性
  1. DevicePower.cpp 修改:
QDBusInterface interface(kPowerService, kPowerPath, kPowerInterface, QDBusConnection::systemBus());

改进建议:

  • 使用D-Bus接口获取电池容量是好的改进,可以保证数据一致性
  • 建议添加错误处理机制,当DBus服务不可用时提供备用方案
  1. DeviceStorage.cpp 修改:
m_Interface = "UFS";

改进建议:

  • 简化了UFS版本的判断逻辑,但可能会丢失版本信息
  • 建议至少保留UFS的基本版本信息,或者提供更详细的接口类型描述
  1. CustomGenerator.cpp 和 DeviceGenerator.cpp 修改:
QString tmpGpuInfo = CommonTools::preGenerateGpuInfo();

改进建议:

  • 将GPU信息获取逻辑移到CommonTools中是好的重构
  • 建议确保新实现的preGenerateGpuInfo函数包含所有必要的信息获取
  1. EDIDParser.cpp/h 修改:
void EDIDParser::parseVendor()

改进建议:

  • 修复了拼写错误(parser->parse),这是好的改动
  • 建议检查所有相关的函数调用,确保命名一致性
  1. commontools.cpp 新增功能:
QString CommonTools::preGenerateGpuInfo()
bool CommonTools::getGpuBaseInfo(QMap<QString, QString> &mapInfo)

改进建议:

  • 新增的GPU信息获取逻辑是好的重构
  • 建议添加更多的错误处理和日志记录
  • 建议考虑添加缓存机制,避免重复获取相同信息
  1. main.cpp 修改:
CommonTools::preGenerateGpuInfo();

改进建议:

  • 在应用启动时预加载GPU信息是好的优化
  • 建议考虑异步加载,避免阻塞应用启动

总体建议:

  1. 统一错误处理机制,确保所有新功能都有适当的错误处理
  2. 添加更多的日志记录,便于调试和问题追踪
  3. 考虑性能优化,特别是频繁调用的函数
  4. 确保代码风格的一致性
  5. 添加更多的单元测试,特别是新增的功能
  6. 考虑添加更多的文档注释,说明复杂逻辑的实现细节

@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 Dec 1, 2025

/forcemerge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Dec 1, 2025

This pr force merged! (status: unstable)

@deepin-bot deepin-bot bot merged commit 05c9de4 into linuxdeepin:master Dec 1, 2025
28 of 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.

4 participants