test: migrate unit tests from Qt5 to Qt6 compatibility#623
Conversation
There was a problem hiding this comment.
Sorry @pengfeixx, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
Fix QMouseEvent 4-arg constructors removed in Qt6, use 6-arg form with QPointF. Add Qt6 runJavaScript stubs with correct signature. Fix sortAppList iterator out-of-bounds causing heap-use-after-free. Fix fileWatcher test hanging due to unstubbed constructor I/O. Fix test scripts to use absolute paths for portability. 修复QMouseEvent在Qt6下移除4参数构造函数的问题,改用6参数形式。 修复sortAppList迭代器越界导致的use-after-free内存错误。 修复fileWatcher测试因构造函数未stub导致的挂起问题。 修复测试脚本路径问题,使用绝对路径提升可移植性。 Log: 单元测试Qt5迁移至Qt6兼容 Influence: 单元测试可在Qt6环境下编译运行,已验证60+测试通过
d91e3f1 to
d328b00
Compare
deepin pr auto review你好!我是CodeGeex。我已经仔细审查了你提供的 整体来看,这是一次质量很高的提交,修复了多个潜在的严重问题。以下是针对语法逻辑、代码质量、代码性能和代码安全四个方面的详细审查意见和改进建议: 一、 语法与逻辑1. 修复了严重的迭代器失效问题(
2. Qt6 的 API 适配(
3. Stub 函数返回值类型修正(
二、 代码质量1. Shell 脚本的健壮性大幅提升(
2. Stub 代码的内存管理(
3. 重复的 Qt 版本判断代码(
三、 代码性能1. 函数参数按值传递(
2. 编译并发数
四、 代码安全1. Shell 脚本中的
2. ASAN 日志拷贝(
总结本次提交质量很高,修复了迭代器越界等严重 Bug,解决了 Qt6 兼容性问题,并对 Shell 脚本进行了规范化重构。建议采纳上述关于使用智能指针管理 Stub、封装 Qt 版本判断宏以及为 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, pengfeixx The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/merge |
Fix QMouseEvent 4-arg constructors removed in Qt6, use 6-arg form with QPointF. Add Qt6 runJavaScript stubs with correct signature. Fix sortAppList iterator out-of-bounds causing heap-use-after-free. Fix fileWatcher test hanging due to unstubbed constructor I/O. Fix test scripts to use absolute paths for portability.
修复QMouseEvent在Qt6下移除4参数构造函数的问题,改用6参数形式。
修复sortAppList迭代器越界导致的use-after-free内存错误。
修复fileWatcher测试因构造函数未stub导致的挂起问题。
修复测试脚本路径问题,使用绝对路径提升可移植性。
Log: 单元测试Qt5迁移至Qt6兼容
Influence: 单元测试可在Qt6环境下编译运行,已验证60+测试通过