chore(tests): adapt unit tests for Qt6 compatibility and fix lcov#425
Merged
deepin-bot[bot] merged 1 commit intoJun 8, 2026
Merged
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
- Add QMouseEvent Qt5/Qt6 constructor compatibility in 5 test files
- Replace Stub with subclass in test_slotQuery to avoid ASan conflict
- Fix lcov coverage extraction path from */src/* to */3rdparty/*
- Add LD_LIBRARY_PATH in cmake-lcov-test.sh for runtime library loading
- Use ${QT_DESIRED_VERSION} instead of hardcoded Qt5 in CMake
适配Qt6兼容性:5个测试文件添加QMouseEvent Qt5/Qt6构造函数兼容性,
使用子类替代Stub避免ASan冲突,修复lcov覆盖率提取路径,
添加LD_LIBRARY_PATH环境变量。
Log: 适配Qt6兼容性并修复单元测试覆盖率问题
Influence: 修复后单元测试可在Qt6环境下正常编译运行,代码覆盖率报告正确生成。
d0e08a7 to
3e2431f
Compare
deepin pr auto review根据提供的git diff,我将从语法逻辑、代码质量、代码性能和代码安全四个方面进行分析,并提出改进建议: 1. CMakeLists.txt 的修改语法逻辑和代码质量:
改进建议:
2. Qt版本相关的测试代码修改语法逻辑和代码质量:
改进建议:
3. 测试代码中的事件处理代码安全和性能:
改进建议:
4. 测试代码中的桩(Stub)替换代码安全和性能:
改进建议:
5. 脚本文件的修改代码安全和性能:
改进建议:
6. 版权信息更新代码质量:
改进建议:
总结
这些修改总体上是积极的,提高了代码的兼容性和可维护性,但仍有进一步优化的空间。 |
lzwind
approved these changes
Jun 8, 2026
|
[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 |
Contributor
Author
|
/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
适配Qt6兼容性:5个测试文件添加QMouseEvent Qt5/Qt6构造函数兼容性,
使用子类替代Stub避免ASan冲突,修复lcov覆盖率提取路径,
添加LD_LIBRARY_PATH环境变量。
Log: 适配Qt6兼容性并修复单元测试覆盖率问题
Influence: 修复后单元测试可在Qt6环境下正常编译运行,代码覆盖率报告正确生成。