1. Replace deprecated qAsConst with std::as_const for Qt6 compatibility 2. Update key sequence handling to use | operator instead of + for Qt6 3. Fix touch event handling for Qt6 API changes 4. Replace stateChanged with checkStateChanged for Qt6 checkbox signals 5. Add version checks for Qt6-specific API changes 6. Fix various other Qt6 deprecation warnings These changes ensure the codebase works correctly with both Qt5 and Qt6, addressing API changes and deprecations in Qt6 while maintaining backward compatibility. Key technical changes include: - Using Qt version checks for API differences - Standardizing on newer APIs where possible - Maintaining compatibility with both major Qt versions fix: 解决Qt6兼容性问题 1. 使用std::as_const替代已弃用的qAsConst以兼容Qt6 2. 更新键序列处理,在Qt6中使用|运算符而非+ 3. 修复Qt6中触摸事件处理的API变更 4. 将stateChanged替换为checkStateChanged以适配Qt6复选框信号 5. 添加Qt6特定API变更的版本检查 6. 修复其他Qt6弃用警告 这些修改确保代码库能正确工作在Qt5和Qt6环境下,解决了Qt6中的API变更和弃用 问题,同时保持向后兼容性。关键技术变更包括: - 针对API差异使用Qt版本检查 - 尽可能标准化使用新API - 保持对两个主要Qt版本的兼容性 |
||
|---|---|---|
| .. | ||
| data | ||
| src/widgets | ||
| testcases | ||
| CMakeLists.txt | ||
| data.qrc | ||
| main.cpp | ||
| test-recoverage.sh | ||