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版本的兼容性
1. Removed automatic itemSpacing adjustment in
DListView::setBackgroundType
2. Added itemSpacing() method in DStyledItemDelegate to dynamically
calculate spacing based on background type
3. Changed itemSpacing member to spacing with default value -1 to
indicate custom spacing
4. Updated all references to use the new itemSpacing() method
The changes prevent the itemSpacing value from being unintentionally
overwritten when setting backgroundType, while maintaining backward
compatibility with the default spacing values for different background
types. This gives more control to developers to set custom spacing
values that won't be overridden by background type changes.
fix: 修复设置背景类型时覆盖itemSpacing值的问题
1. 移除了DListView::setBackgroundType中自动调整itemSpacing的逻辑
2. 在DStyledItemDelegate中添加itemSpacing()方法根据背景类型动态计算间距
3. 将itemSpacing成员改为spacing并设置默认值-1表示自定义间距
4. 更新所有引用以使用新的itemSpacing()方法
这些修改防止了在设置backgroundType时意外覆盖itemSpacing值的问题,同时保
持了对不同背景类型默认间距值的向后兼容性。这为开发者提供了更多控制权,可
以设置不会被背景类型更改覆盖的自定义间距值。
1. Changed version parameter to be optional in GitHub workflow to allow
more flexible release process
2. Updated rpm spec file formatting for consistency and added %{?dist}
macro for proper package naming
The changes allow for:
- More flexible release process where version can be omitted
- Better formatted spec file with proper dist macro for package naming
fix: 使发布工作流中的版本可选并更新spec文件
1. 将GitHub工作流中的版本参数改为可选,以实现更灵活的发布流程
2. 更新rpm spec文件格式以保持一致性,并添加%{?dist}宏以正确命名包
这些更改允许:
- 更灵活的发布流程,可以省略版本号
- 格式更好的spec文件,带有正确的dist宏用于包命名
1. Replaced window_normal.dci with window_restore.dci and
window_quit_full.dci icons
2. Updated icon references in dtk-icon-theme.qrc resource file
3. Simplified title bar button drawing functions to use new icons
instead of manual drawing
4. Modified DStyle implementation to use the new icon assets
5. Improved visual consistency by using pre-made icons rather than
programmatic drawing
The changes were made to:
- Standardize window control icons across the application
- Replace programmatic drawing with higher quality vector icons
- Make the UI more maintainable by using consistent icon assets
- Prepare for future theme support by using icon resources
feat: 更新窗口控制图标和绘制逻辑
1. 用 window_restore.dci 和 window_quit_full.dci 图标替换了
window_normal.dci
2. 更新了 dtk-icon-theme.qrc 资源文件中的图标引用
3. 简化了标题栏按钮绘制函数,使用新图标替代手动绘制
4. 修改了 DStyle 实现以使用新的图标资源
5. 通过使用预制图标而非程序绘制提高了视觉一致性
这些修改的目的是:
- 标准化应用程序中的窗口控制图标
- 用更高质量的矢量图标替代程序绘制
- 通过使用一致的图标资源提高UI可维护性
- 通过使用图标资源为未来主题支持做准备
Use VERSION file to manage DTK version. VERSION file defines package version. It also decides the initial value of cached variable DTK_VERSION which controls the project version in cmake build system. VERSION file is not synchronized to DTK6, as DTK6 has its own VERSION file. One can still pass version to DTK_VERSION when running cmake configure. This is helpful for developers.
Signed-off-by: Yixue Wang <wangyixue@deepin.org>
Fixed the text elision behavior in DLabel to properly handle cases
where the label contains shortcut mnemonics. The change modifies the
Qt::TextShowMnemonic flag to only be applied when the label actually has
a shortcut (d->hasShortcut). This prevents incorrect text display when
eliding labels without shortcuts.
fix: 修正带快捷键标签的文本省略行为
修复了 DLabel 中文本省略行为,正确处理包含快捷键助记符的情况。修改了
Qt::TextShowMnemonic 标志,使其仅在标签实际具有快捷键(d->hasShortcut)时
应用。这防止了在没有快捷键的标签上出现错误的文本显示。
pms: BUG-285143
1. Removed fixed font-size from website link template to use consistent
font sizing
2. Added font binding for website label using font manager with T8 size
and Medium weight
3. This ensures consistent typography across the application and better
accessibility
style: 调整关于对话框中网站链接样式
1. 从网站链接模板中移除固定字体大小,改用一致的字体大小设置
2. 为网站标签添加字体管理器绑定,使用T8大小和中等等级
3. 确保应用程序中一致的排版和更好的可访问性
pms: BUG-314767
QApplication::notify has change the default action
``` qapplication.cpp
we.setAccepted(true);
we.m_spont = wheel->spontaneous() && w == receiver;
res = d->notify_helper(w, &we);
eventAccepted = we.isAccepted();
```
Event is accepted if we don't call parent class event function,
it cause event will not be passed on to it's parentWidget.
and it's different with qt5.
pms: BUG-306251
acknowledgementLabel is wild pointer if DDialog::clearContents
is called.
aboutDialog->setLicenseEnabled is not need to call when reactive
the dialog
pms: TASK-368399
WM's animation is confliclt with Widget.
We disable DDrawer's animation when window is invisible, and
can use D_DTK_DISABLE_ANIMATIONS to disable it's animation.
pms:BUG-242611
it's maybe a feature for qt6, we can't modify backingStore when
readying the widget.
``` QWidget::paintEvent(QPaintEvent *event)
QPainter pa(this);
// pa.end() // it's ok when modifing backingStore.
QImage image(window()->backingStore()->handle()->toImage());
image.detach();
```
pms:BUG-304317