Commit Graph

539 Commits

Author SHA1 Message Date
github-actions[bot] b03849d6de chore: New release 5.7.25
Log:
2025-10-30 13:59:43 +00:00
zhangkun 187be9a947 feat: improve icon theme generation with scalable support
1. Add SCALABLE_SIZE constant for scalable icon directories
2. Change foundSize return type from uint to int to support scalable
detection
3. Modify writeScaledImage to accept baseSize parameter instead of
parsing from directory
4. Move directory parsing logic to writeImage function for better
organization
5. Add scalable directory detection in size parsing logic
6. Use QImageReader's scaledSize for better image scaling quality
7. Fix error handling to continue processing instead of exiting on first
error

Log: Improved icon theme generation with better scalable icon support

Influence:
1. Test with icon directories containing scalable icons
2. Verify different scale factors work correctly
3. Test error handling when encountering invalid image files
4. Verify image quality at various scales
5. Test with both fixed-size and scalable icon directories

feat: 改进图标主题生成,支持可缩放图标

1. 添加 SCALABLE_SIZE 常量用于可缩放图标目录
2. 将 foundSize 返回类型从 uint 改为 int 以支持可缩放检测
3. 修改 writeScaledImage 函数,接受 baseSize 参数而非从目录解析
4. 将目录解析逻辑移至 writeImage 函数以获得更好的代码组织
5. 在尺寸解析逻辑中添加可缩放目录检测
6. 使用 QImageReader 的 scaledSize 获得更好的图像缩放质量
7. 修复错误处理,在遇到错误时继续处理而非立即退出

Log: 改进图标主题生成,提供更好的可缩放图标支持

Influence:
1. 测试包含可缩放图标的目录
2. 验证不同缩放因子是否正确工作
3. 测试遇到无效图像文件时的错误处理
4. 验证各种缩放比例下的图像质量
5. 测试固定尺寸和可缩放图标目录
2025-10-23 08:41:20 +00:00
github-actions[bot] 16145642e1 chore: New release 5.7.24
Log:
2025-10-16 20:13:34 +08:00
zhangkun 39a50cca37 feat: improve icon size detection and duplicate handling
1. Added foundSize function to parse icon size from directory names
using multiple strategies
2. Implemented duplicate entry detection to skip existing icons in DCI
files
3. Added QFileInfo and QLogging includes for new functionality
4. Removed debug-specific code that was adding unnecessary prefixes
5. Improved size detection logic to handle both numeric and "NxN" format
directory names
6. Added fallback to parent directory when current directory name
doesn't contain size information

Log: Improved icon theme generation with better size detection and
duplicate prevention

Influence:
1. Test icon theme generation with various directory naming conventions
2. Verify that duplicate icons are properly skipped during generation
3. Test with directories containing numeric names vs "widthxheight"
format
4. Verify fallback to parent directory size detection works correctly
5. Check that existing icons in DCI files are not overwritten
6. Test with different directory structures and naming patterns

feat: 改进图标尺寸检测和重复项处理

1. 添加 foundSize 函数,使用多种策略从目录名解析图标尺寸
2. 实现重复条目检测,跳过 DCI 文件中已存在的图标
3. 添加 QFileInfo 和 QLogging 包含以支持新功能
4. 移除添加不必要前缀的调试专用代码
5. 改进尺寸检测逻辑,支持数字和"NxN"格式的目录名
6. 在当前目录名不包含尺寸信息时,添加回退到父目录的检测

Log: 改进图标主题生成,提供更好的尺寸检测和重复项预防

Influence:
1. 测试使用不同目录命名约定的图标主题生成
2. 验证在生成过程中重复图标是否被正确跳过
3. 测试包含数字名称与"宽x高"格式的目录
4. 验证回退到父目录尺寸检测是否正常工作
5. 检查 DCI 文件中现有图标是否不会被覆盖
6. 测试不同的目录结构和命名模式
2025-10-16 11:05:03 +00:00
yeshanshan 2767618f84 fix: fix Qt6 compilation error with libxdg
1. Restructured the conditional logic for libxdg usage to avoid Qt6
compilation errors
2. Moved the DTK_DISABLE_LIBXDG check to outer scope to properly handle
both Qt5 and Qt6
3. Added explicit Qt6 handling by disabling libxdg when not using Qt5
4. This resolves build failures in Qt6 environments where
Qt5XdgIconLoader is not available

The previous implementation only checked for Qt5XdgIconLoader when
using Qt5, but didn't properly handle Qt6 scenarios, causing compilation
errors when building with Qt6.

fix: 修复 Qt6 下 libxdg 编译错误

1. 重构了 libxdg 使用的条件逻辑以避免 Qt6 编译错误
2. 将 DTK_DISABLE_LIBXDG 检查移到外层作用域以正确处理 Qt5 和 Qt6
3. 添加了明确的 Qt6 处理逻辑,在非 Qt5 环境下禁用 libxdg
4. 解决了在 Qt6 环境中因 Qt5XdgIconLoader 不可用而导致的构建失败问题

之前的实现只在 Qt5 环境下检查 Qt5XdgIconLoader,但没有正确处理 Qt6 场
景,导致在使用 Qt6 构建时出现编译错误。
2025-10-16 17:39:56 +08:00
ComixHe 36c06be095 fix: correct lockfile path construction
Move process ID namespace handling from lockfile to socket_key variable to ensure consistent lock file paths.
Reorganize code structure for proper execution order.

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-10-16 13:14:00 +08:00
ComixHe 80db4dd238 feat: support Qt 6.10
Also adjusting the logic for finding QtXDGIconLoader.
This library only be used in Qt 5.

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-10-13 13:03:30 +08:00
github-actions[bot] 3d0713f7a2 chore: New release 5.7.23
Log:
2025-09-25 17:44:27 +08:00
Mingcong Bai af1259edbb fix(tests): fix build for Qt 6.9
Qt 6.9 renamed <private/qdesktopunixservices_p.h> to
<private/qgenericunixservices_p.h>, as well as some of the classes along
the same format (QGenericUnixServices => QDesktopUnixServices).

Add a condition test with QT_VERSION to fix build with Qt >= 6.9.

Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
2025-09-24 16:17:19 +08:00
Robertkill 3b5ba9bbda fix: 解决控制中心闪烁问题
初始化时立即读取并设置主题色,避免异步出现主题色闪烁问题

Log: 修复配置管理以使用标准 DConfig 接口

Influence:
1. 测试主题切换功能以确保正确的主题类型检测
2. 验证动画设置使用新的配置方法正常工作
3. 检查主题偏好是否正确保存和恢复
4. 测试配置值缺失或无效时的应用程序行为

PMS: BUG-334439
2025-09-18 13:26:13 +08:00
github-actions[bot] c8f2955bd0 chore: New release 5.7.22
Log:
2025-09-04 20:06:26 +08:00
zhangkun 96d0b45dd0 feat: add T11 font size and adjust T5 default
Added T11 font size with 8px default value to extend the font size
options
Modified T5 default size from 17px to 16px for better size progression
Updated font pixel size array to include the new T11 size
Added t11() accessor method and corresponding test case
cherry-pick from: 2c3b351b43

feat: 添加 T11 字体大小并调整 T5 默认值

添加了默认值为 8px 的 T11 字体大小以扩展字体大小选项
将 T5 默认大小从 17px 修改为 16px 以获得更好的大小递进
更新了字体像素大小数组以包含新的 T11 大小
添加了 t11() 访问器方法和相应的测试用例
cherry-pick from: 2c3b351b43

pms: BUG-310879
2025-09-01 11:27:52 +08:00
ComixHe 00109d07e3 fix: improve PID namespace detection in setSingleInstance
Replace stat-based PID namespace detection with QFileInfo approach
for better compatibility across different kernel versions and
containerized environments. Add robust parsing and fallback handling
for namespace format variations.

PMS: BUG-329663
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-08-19 10:14:09 +08:00
github-actions[bot] d2c2efc49a chore: New release 5.7.21
Log:
2025-08-14 20:28:21 +08:00
yeshanshan 9842a0644e fix: resolve compilation warnings and deprecation issues
1. Fixed deprecated enum usage by adding explicit deprecation comment
for IconAttibute
2. Added QT version checks for QMouseEvent::globalPos() vs
globalPosition() API changes
3. Marked unused parameters with Q_UNUSED to suppress warnings
4. Added version checks for DTK 6.0 API changes
5. Fixed test class visibility warnings by adding GTEST_API_ prefix
6. Improved warning messages to use modern qWarning() stream syntax
7. Added [[maybe_unused]] attribute for DEFINE_CONST_CHAR macro
8. Added version checks for QVariant type handling differences between
Qt5/Qt6
9. Fixed potential memory leak in DIconTheme::isXdgIcon() logic
10. Added proper type checks for QVariant conversions

Log: Fixed various compilation warnings and deprecated API usage

Influence:
1. Verify icon rendering still works correctly after enum changes
2. Test window movement functionality with both Qt5 and Qt6
3. Check palette handling in DGuiApplicationHelper
4. Verify test cases still pass with updated class visibility
5. Test QVariant conversions in DPlatformHandle properties

fix: 解决编译警告和废弃API问题

1. 为废弃的IconAttibute枚举添加明确的弃用注释
2. 为QMouseEvent::globalPos()和globalPosition()API变更添加QT版本检查
3. 使用Q_UNUSED标记未使用参数以消除警告
4. 添加DTK 6.0 API变更的版本检查
5. 通过添加GTEST_API_前缀修复测试类可见性警告
6. 改进警告消息使用现代qWarning()流式语法
7. 为DEFINE_CONST_CHAR宏添加[[maybe_unused]]属性
8. 添加Qt5/Qt6之间QVariant类型处理的版本检查
9. 修复DIconTheme::isXdgIcon()中潜在的内存泄漏问题
10. 为QVariant转换添加适当的类型检查

Log: 修复各种编译警告和废弃API使用问题

Influence:
1. 验证图标渲染在枚举变更后仍能正常工作
2. 测试Qt5和Qt6下的窗口移动功能
3. 检查DGuiApplicationHelper中的调色板处理
4. 验证更新类可见性后测试用例是否仍能通过
5. 测试DPlatformHandle属性中的QVariant转换
2025-08-14 11:39:10 +00:00
yeshanshan 9d3d659afe feat: add flags parameter to DDciIconPlayer play method
1. Added new overloaded play method that accepts
DDciIconImagePlayer::Flags parameter
2. Modified existing play method to call new method with default
IgnoreLastImageLoop flag
3. Updated documentation to reflect new method signature and behavior
4. Allows more control over icon playback behavior through flags
parameter

feat: 为 DDciIconPlayer 的 play 方法添加 flags 参数

1. 添加了新的重载 play 方法,接受 DDciIconImagePlayer::Flags 参数
2. 修改现有 play 方法以使用默认的 IgnoreLastImageLoop 标志调用新方法
3. 更新文档以反映新的方法签名和行为
4. 通过 flags 参数提供对图标播放行为的更多控制
2025-08-07 14:38:07 +08:00
github-actions[bot] eaf96e824d chore: New release 5.7.20
Log:
2025-07-31 20:29:47 +08:00
zhangkun 7c05bace4a feat: switch to QGuiApplication for SVG rendering
1. Changed from QCoreApplication to QGuiApplication to support SVG
rendering
2. Updated CMakeLists to link against QtGui instead of QtCore
3. This change is necessary because SVG rendering requires GUI
components
4. Note: CLI environment users must set QT_QPA_PLATFORM=offscreen

feat: 切换到 QGuiApplication 以支持 SVG 渲染

1. 从 QCoreApplication 切换到 QGuiApplication 以支持 SVG 渲染
2. 更新 CMakeLists 链接 QtGui 替代 QtCore
3. 此变更是必要的因为 SVG 渲染需要 GUI 组件
4. 注意:命令行环境用户需要设置 QT_QPA_PLATFORM=offscreen
2025-07-31 13:42:53 +08:00
yeshanshan a892ddc4e2 feat: add concurrent processing for DCI icon conversion
1. Added QtConcurrent support for parallel processing of icon files
2. Implemented error handling with custom DciProcessingError exception
3. Grouped icon files by name to avoid concurrent access to same DCI
file
4. Improved performance by processing icon groups in parallel
5. Added proper error propagation and atomic flag for early termination
6. Maintained existing functionality while adding concurrency
7. Each icon group is processed as a unit to ensure thread safety with
DCI files

feat: 为DCI图标转换添加并发处理

1. 添加QtConcurrent支持以实现图标文件的并行处理
2. 使用自定义DciProcessingError异常实现错误处理
3. 按名称分组图标文件以避免对同一DCI文件的并发访问
4. 通过并行处理图标组提高性能
5. 添加适当的错误传播和原子标志用于提前终止
6. 在添加并发性的同时保持现有功能
7. 每个图标组作为一个单元处理以确保DCI文件的线程安全
2025-07-24 20:49:35 +08:00
yeshanshan 65cf7b4161 refactor: move icon finder functionality to separate tool
1. Removed icon finding functionality from dci-icon-theme to make it a
pure TUI tool
2. Created new dci-iconfinder tool specifically for icon lookup
operations
3. Changed dci-icon-theme to use QCoreApplication instead of
QGuiApplication
4. Updated version handling to use DTK version macros
5. Removed GUI dependencies from dci-icon-theme
6. Added proper documentation for both tools

This change was necessary to separate concerns and allow dci-icon-theme
to be used in environments without GUI dependencies while maintaining
icon lookup capabilities in a dedicated tool.

refactor: 将图标查找功能移至独立工具

1. 从dci-icon-theme中移除图标查找功能,使其成为纯命令行工具
2. 创建新的dci-iconfinder工具专门处理图标查找操作
3. 将dci-icon-theme改为使用QCoreApplication而非QGuiApplication
4. 更新版本处理以使用DTK版本宏
5. 移除dci-icon-theme对GUI的依赖
6. 为两个工具添加了适当的文档

此变更是为了分离关注点,使dci-icon-theme可以在没有GUI依赖的环境中使用,
同时将图标查找功能保留在专用工具中。
2025-07-23 04:16:59 +00:00
ComixHe 6b7e941839 feat: add pid namespace isolation to setSingleInstance
Enhance setSingleInstance to support multiple PID namespaces for
containerized environments. This prevents applications in different
containers from interfering with each other's single instance detection.

The lockfile format becomes: {original_name}_{namespace_inode}.lock,
ensuring unique identification across different PID namespaces.

Signed-off-by: ComixHe <heyuming@deepin.org>
2025-07-22 14:19:01 +08:00
yeshanshan dc2eaeb61c docs: update REUSE license file for CHANGELOG
Added CHANGELOG.md to the list of files under CC-BY-4.0 license
in .reuse/dep5
This change ensures proper licensing attribution for the changelog file
The modification follows the project's REUSE compliance standards

docs: 更新 REUSE 许可文件以包含 CHANGELOG

在 .reuse/dep5 文件中将 CHANGELOG.md 添加到 CC-BY-4.0 许可证下的文件列表
此变更确保了对变更日志文件的正确许可归属
修改遵循项目的 REUSE 合规标准
2025-07-21 09:55:22 +08:00
github-actions[bot] 4dd22b538d chore: New release 5.7.19
Log:
2025-07-03 13:23:09 +00:00
yeshanshan 2ea4e762fe fix: enhance build security hardening
1. Added security hardening compiler flags in debian/rules including
stack protection and RELRO
2. Removed redundant linker flag from dtkgui.cmake that was already set
in debian/rules
3. Consolidated security-related build flags in debian/rules for better
maintainability
4. The changes improve binary security against common exploits while
maintaining compatibility

fix: 增强构建安全加固

1. 在debian/rules中添加了安全加固编译标志,包括栈保护和RELRO
2. 从dtkgui.cmake中移除了已在debian/rules中设置的冗余链接器标志
3. 将安全相关的构建标志整合到debian/rules中以提高可维护性
4. 这些改动提高了二进制文件对常见漏洞攻击的防护能力,同时保持兼容性
2025-07-03 13:03:14 +00:00
github-actions[bot] 18388f26f8 chore: New release 5.7.18
Log:
2025-06-27 09:19:06 +00:00
yeshanshan 9e54cbfad4 fix: make version parameter optional in release workflow
1. Changed version parameter from required to optional in GitHub
workflow
2. Fixed spec file formatting by aligning Version and Release fields
3. Added %{?dist} macro to Release field for proper RPM building

The changes make the release workflow more flexible by allowing version-
less releases while maintaining proper RPM spec file formatting and
distribution tagging. This helps with automated release processes and
ensures consistent package building across different distributions.

fix: 在发布工作流中使版本参数可选

1. 将 GitHub 工作流中的版本参数从必填改为可选
2. 修复 spec 文件格式,对齐 Version 和 Release 字段
3. 在 Release 字段添加 %{?dist} 宏以支持正确的 RPM 构建

这些变更使发布工作流更加灵活,允许无版本号的发布,同时保持 RPM spec 文件
的正确格式和分发标签。这有助于自动化发布流程并确保在不同发行版上一致的软
件包构建。
2025-06-27 16:43:59 +08:00
github-actions[bot] 6ff5c37579 chore(rpm): New release 5.7.17
Log:
2025-06-19 10:22:12 +08:00
asterwyx dd35e33644 chore: update .syncexclude
Exclude CHANGELOG.md.
2025-06-18 17:03:05 +08:00
Yixue Wang f834cb588d feat(ci): Add auto release workflow
Log: as title
2025-06-11 11:46:44 +08:00
Yixue Wang 9f500cbe94 feat: Support VERSION file
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>
2025-06-11 11:46:44 +08:00
Wang Zichong 44bed9e070 fix: add missing prefix for QTranslator::load()
Log:
2025-06-06 18:12:53 +08:00
ComixHe 3f1cfd6800 fix: add missing header
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-06-06 10:10:42 +08:00
Wang Zichong 1f44c47e55 chore: use another QTranslator::load overload to tidy code
使用另一个 QTranslator::load 重载来使代码更简洁,并潜在的支持
QLocale::uiLanguages().

并且添加了一个额外的接口来方便其他项目更方便的调用.

Log:
2025-06-04 09:54:37 +00:00
Ye ShanShan 28c53f37e7 chore: bump version to 5.7.16
update changelog to 5.7.16
2025-05-19 09:26:17 +00:00
Ye ShanShan 75d176f234 chore: bump version to 5.7.15
update changelog to 5.7.15
2025-05-08 10:48:29 +00:00
Ye ShanShan 6d6a4a4380 fix: correct bitwise operation in preference handling
1. Fixed incorrect bitwise AND operation in OrgDeepinDTKPreference class
2. Changed `fetchAndAndOrdered(1 << (index - 0))` to
`fetchAndAndOrdered(~(1 << (index - 0)))`
3. This ensures proper bit clearing operation when updating property
status flags
4. The original code would incorrectly set bits instead of clearing them

fix: 修复偏好设置处理中的位操作错误

1. 修正了 OrgDeepinDTKPreference 类中错误的位与操作
2. 将 `fetchAndAndOrdered(1 << (index - 0))` 改为
`fetchAndAndOrdered(~(1 << (index - 0)))`
3. 确保在更新属性状态标志时正确的位清除操作
4. 原代码会错误地设置位而不是清除它们
2025-05-08 09:52:03 +00:00
Ye ShanShan ed252239b2 fix: prevent theme saving when DontSaveApplicationTheme is set
Added a condition to check DontSaveApplicationTheme attribute before
saving theme type to config
This prevents unwanted theme persistence when the application explicitly
requests not to save theme preferences
The change maintains backward compatibility while respecting the
application's preference flag

fix: 当设置DontSaveApplicationTheme时阻止主题保存

在将主题类型保存到配置前添加了检查DontSaveApplicationTheme属性的条件
这可以防止当应用程序明确要求不保存主题偏好时进行不必要的主题持久化
该改动在尊重应用程序偏好标志的同时保持了向后兼容性
2025-05-08 09:52:03 +00:00
Ye ShanShan aa13f2a82f refactor: improve thread safety in OrgDeepinDTKPreference
1. Changed parent initialization from direct assignment to nullptr in
constructor
2. Added QPointer to track parent object for thread safety
3. Implemented parent object verification before setting parent
relationship
4. Added safety checks for parent object changes during thread
operations
5. Updated build path in file header comment

refactor: 改进 OrgDeepinDTKPreference 的线程安全性

1. 将构造函数中的父对象初始化改为直接赋值为 nullptr
2. 添加 QPointer 用于线程安全的父对象跟踪
3. 在设置父子关系前实现父对象验证
4. 添加线程操作期间父对象变化的安全检查
5. 更新文件头注释中的构建路径
2025-05-07 03:45:13 +00:00
Ye ShanShan decbf724b3 fix: build failed in qt5
Changed Q_GLOBAL_STATIC to Q_GLOBAL_STATIC_WITH_ARGS for
OrgDeepinDTKPreference initialization
This modification provides better type safety and clearer syntax for the
complex initialization parameters
The change maintains the same functionality while following Qt's
recommended practices for static initialization

refactor: 更新 DConfig 初始化语法

将 Q_GLOBAL_STATIC 改为 Q_GLOBAL_STATIC_WITH_ARGS 用于
OrgDeepinDTKPreference 初始化
此修改为复杂的初始化参数提供了更好的类型安全性和更清晰的语法
该变更保持了相同的功能,同时遵循 Qt 推荐的静态初始化实践
2025-04-29 06:03:39 +00:00
JiDe Zhang 7c2b35ae42 feat: use dconfig2cpp for read/write the DConfig
The org.deepin.dtk.preference.json file is not in this project, so
we can't generated codes by cmake.
2025-04-25 10:03:22 +08:00
JiDe Zhang ec6fbaf651 fix: fix build on Qt 6.8
Maybe start from 6.8.1
2025-04-25 10:03:22 +08:00
Ye ShanShan d3b68df561 chore: bump version to 5.7.14
update changelog to 5.7.14
2025-04-17 13:56:22 +00:00
ComixHe 5eb6b4c403 build: compiling failed with Qt 6.9
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-04-17 06:25:31 +00:00
Ye ShanShan 75208f151f chore: bump version to 5.7.13
update changelog to 5.7.13
2025-03-20 18:07:30 +08:00
Ye ShanShan 5ce8bf3755 chore: bump version to 5.7.12
update changelog to 5.7.12
2025-03-06 17:40:25 +08:00
Ye ShanShan 0a0182faac fix: palette refresh delayed in qt6
QGuiApplication::paletteChanged is deprecated in qt6,
Delay to emit themeTypeChanged signal, palette doesn't refresh
after sending ThemeChangeEvent.

pms: BUG-303929
2025-03-06 15:49:13 +08:00
jingshenghao c52610f23c feat: Add files generated by qdbusXML2cpp and DCONG2cpp
Add files generated by qdbusXML2cpp and DCONG2cpp

Log: Add files generated by qdbusXML2cpp and DCONG2cpp
2025-03-04 20:04:38 +08:00
Ye ShanShan 6cc9f8ac48 chore: bump version to 5.7.11
update changelog to 5.7.11
2025-02-27 21:05:15 +08:00
Ye ShanShan 8110fd861e chore: bump version to 5.7.10
update changelog to 5.7.10
2025-02-13 11:01:28 +00:00
Ye ShanShan 3c16e777fe fix: icon is blurry
iconSize doesn't multiplied by devicePixelRatio in pixmap,
but it's doesn't need to be in qt5.

pms:BUG-302919
2025-02-13 02:33:28 +00:00