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版本的兼容性
Add interface updateDialogSettingInfo, apps can update print dialog
settings at construction time.
Add docs and UT, fix a bug that may cause a memory leak.
Log: DPrintPreviewDialog add update setting interface.
Influence: Add update setting interface.
* remove redundant "dtkwidget" in include directory;
* improve cmake, modify some variable names, use file() to collect
source files for scalability;
* add full target_link_libraries support.
Log: add full target_link_libraries support
Influence: all projects who include headers directly by path
Implements the DImageViewer interface, including rotate, scale, gesture.
Add unit test cases and interface comment.
Log: Implements DImageViewer rotate, scale and gesture.
Implements the DImageViewer interface, including set image and clear.
And implements the DGraphicsitem classes, add unit test cases, update comment.
Log: Implements DImageViewer set image and clear.
we remove DStandardItem::clone due to incompatible in V23,
item->clone() call QStandardItem's function actually, so it
isn't a DStandardItem, but the clone's intention need to be test.
it doesn't need to cherry-pick to master.
Log: 单元测试失败
Bug: https://pms.uniontech.com/bug-view-156901.html
Influence: 无
Change-Id: Ibac6bc721104bb0bc2f16c3a63a12fbc20e88f22
DStandardItem's `setActionList` can't be used with drag because of
Type doesn't support metatype's save and load.
and DStandardItem doesn't release it's Action when destruction,
we use sharedpointer to manager action's life.
Add clone override function to support that action can be access
after draged, and it need to setItemPrototype by model.
Log: 含有Action项的DListView拖动时程序崩溃
Influence: none
Change-Id: Idc489b94f4cf95850fe00a9ac8231fed80913a79
Add EventLoop for ut, it's useful in some scene, for example,
when deleteLater called but we need check QPointer's value now.
Log: all ut run in event loop
Influence: none
Change-Id: I1f35069215d5a6beba51c1aa1dd21f51d2e582a3