Skip to content

Conversation

@add-uos
Copy link
Contributor

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

pick develop/eagle to master

GongHeng2017 and others added 5 commits December 1, 2025 14:19
-- Local variable "items" shadows outer variable.
-- Function parameter should be passed by const reference.

pick from: linuxdeepin@52f6971
Corrected I2C protocol touchpad showing as PS/2 interface in Device
Manager, and updated input device interface detection rules.

pick from: linuxdeepin@6e5ecd7

Log: Fix incorrect Bus interface display for I2C devices

Bug: https://pms.uniontech.com/bug-view-326531.html
Task: https://pms.uniontech.com/task-view-379781.html
Change-Id: Id30e6e792ce8757de50a53e68fec6af69d490644
-- parse the edid ,and show the right monitor name.

pick from: linuxdeepin@662a912

Log: add feature for Monitor.
Task: https://pms.uniontech.com/task-view-379819.html
-- The "ret" is not use, so remvoe it.

pick from: linuxdeepin@dabc018
-- Enhance application runtime performance
-- Clean up dead/unused code

pick from: linuxdeepin@04d5c66
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

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

  1. 语法逻辑改进:
  • 在DeviceAudio.cpp等文件中,移除了多余的ret变量赋值,改为直接调用setTomlAttribute函数。这样可以避免不必要的返回值检查,使代码更简洁。

  • 在DeviceGpu.cpp中,使用QT_SKIP_EMPTY_PARTS替代了条件编译的split方式,提高了代码的可读性和维护性。

  • 在DeviceInput.cpp中,新增了getMouseInfoFromBusDevice()方法,通过解析/proc/bus/input/devices获取设备接口信息,使输入设备信息获取更准确。

  1. 代码质量改进:
  • 在DeviceManager.cpp中,将全局mutex改为static,避免全局命名空间污染。

  • 在DeviceManager.cpp的tomlDeviceReadKeyValue方法中,移除了多余的break语句,使用更简洁的switch-case结构。

  • 在DeviceMonitor.cpp中,新增了setInfoFromEdidForCustom方法,专门处理自定义显示器的EDID信息,提高了代码的模块化程度。

  1. 代码性能改进:
  • 在DeviceInput.cpp中,使用静态QMap存储bus信息,避免重复创建,提高性能。

  • 在CommonTools.cpp中,优化了EDID解析逻辑,支持两种不同的hexdump输出格式,提高了兼容性。

  1. 代码安全改进:
  • 在DeviceManager.h中,将correctNetworkLinkStatus方法的参数改为const引用,避免不必要的拷贝。

  • 在DeviceNetwork.h中,同样将correctCurrentLinkStatus方法的参数改为const引用。

  • 在DeviceInput.cpp中,添加了对I2C接口的支持,扩展了设备类型判断。

  1. 其他改进:
  • 在EDIDParser.cpp中,新增了parseMonitorName方法,可以从EDID中解析出显示器名称,使设备信息更完整。

  • 在DeviceMonitor.cpp中,修改了getOverviewInfo方法,支持特殊计算机类型的显示方式。

建议:

  1. 考虑将getDetailBusInfo中的静态QMap移到类内部作为静态成员,提高封装性。

  2. 在CommonTools::parseEDID方法中,可以考虑将hexdump命令的执行逻辑抽取为单独的方法,提高代码可读性。

  3. 在EDIDParser::parseMonitorName方法中,可以考虑添加更多的错误处理和日志输出,便于调试。

  4. 建议在DeviceInput::getMouseInfoFromBusDevice方法中添加超时处理,避免进程长时间阻塞。

  5. 在DeviceManager::tomlDeviceReadKeyValue方法中,可以考虑使用函数指针或std::map来替代大量的switch-case,提高代码的可维护性。

@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 cf8255b into linuxdeepin:master Dec 1, 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.

4 participants