Skip to content

Conversation

@lichaofan2008
Copy link
Contributor

Adapted to the v20 system, issues of compile on Qt5.
适配v20系统,完成Qt5环境的编译流程。

v20 BUG 分支合一到v25主线
Task: https://pms.uniontech.com/task-view-383475.html

Adapted to the v20 system, issues of compile on Qt5.
适配v20系统,完成Qt5环境的编译流程。

v20 BUG 分支合一到v25主线
Task: https://pms.uniontech.com/task-view-383475.html
@deepin-ci-robot
Copy link

deepin pr auto review

我来帮你分析这两处代码修改:

  1. movieservice.cpp 的修改:
+#include <QRegularExpression>

这是一个头文件添加,看起来是为了使用正则表达式功能。这个修改本身没有问题,但建议:

  • 确保在代码中实际使用了 QRegularExpression
  • 如果只是为了简单的字符串匹配,可以考虑使用更轻量级的 QString::contains() 等方法
  • 如果确实需要正则表达式,建议在代码中添加适当的注释说明用途
  1. imagegraphicsview.cpp 的修改:
#if QT_VERSION_MAJOR >= 6
    scaleAtPoint(event->position().toPoint(), factor);
#else
    scaleAtPoint(event->pos(), factor);
#endif

这是一个很好的 Qt 版本兼容性处理。建议:

  • 修改是正确的,因为 Qt6 中 QWheelEvent 的 pos() 方法被 position() 替代
  • 可以考虑使用 QVersionNumber 进行更精确的版本判断
  • 建议在项目文档中记录这个兼容性处理的细节
  • 如果可能,可以考虑将版本判断逻辑提取为宏或工具函数,便于统一管理

总体评价:

  1. 代码修改合理,解决了版本兼容性问题
  2. 建议添加更多注释说明修改原因
  3. 可以考虑建立统一的版本兼容性处理机制
  4. 建议在代码审查文档中记录这些修改

这些修改都是安全的,不会影响代码的性能和安全性。主要是为了提高代码的兼容性和可维护性。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@lichaofan2008
Copy link
Contributor Author

/merge

@deepin-bot deepin-bot bot merged commit 8e92808 into linuxdeepin:master Dec 23, 2025
20 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