Compare commits

..

454 Commits

Author SHA1 Message Date
github-actions[bot] 46e6d5e8e5 chore: New release 5.7.25
Log:
2025-10-30 13:59:58 +00:00
github-actions[bot] 84b0b917b9 chore: New release 5.7.24
Log:
2025-10-16 12:11:59 +00:00
yeshanshan 840b931148 fix: sync with qt5platform-plugins
https://github.com/linuxdeepin/qt5platform-plugins/pull/305
2025-10-16 13:41:10 +08:00
ComixHe 8e85a7cd54 feat: support Qt 6.10
Signed-off-by: ComixHe <heyuming@deepin.org>
2025-10-11 13:17:44 +08:00
yeshanshan 14c291e1ef fix: prevent thread-safety issue in D-Bus config manager
1. Store D-Bus object path in local variable to avoid potential thread-
safety issues
2. The original code used QDBusObjectPath directly which could be
modified by other threads sharing the same systemBus connection
3. This ensures the path value remains consistent throughout the config
manager initialization process
4. Also fixed inconsistent logging macro usage (cfLog vs cfLog())

Log: Fixed potential thread-safety issue in configuration manager
initialization

Influence:
1. Test configuration manager initialization under multi-threaded
scenarios
2. Verify D-Bus communication stability when multiple threads access
systemBus
3. Ensure config manager creation works correctly in concurrent
environments
4. Test application startup and config loading in multi-process
scenarios

fix: 修复 D-Bus 配置管理器中的线程安全问题

1. 将 D-Bus 对象路径存储在局部变量中以避免潜在的线程安全问题
2. 原代码直接使用 QDBusObjectPath,可能被共享同一 systemBus 连接的其他线
程修改
3. 确保路径值在配置管理器初始化过程中保持一致
4. 同时修复了不一致的日志宏使用(cfLog vs cfLog())

Log: 修复配置管理器初始化中的潜在线程安全问题

Influence:
1. 在多线程场景下测试配置管理器初始化
2. 验证多线程访问 systemBus 时的 D-Bus 通信稳定性
3. 确保在并发环境中正确创建配置管理器
4. 测试多进程场景下的应用程序启动和配置加载

PMS: BUG-335523
2025-10-10 17:10:40 +08:00
wjyrich dbf42d7701 fix: replace rmdir with rename for directory operations
Changed rmdir to rename when handling directory operations in trash
manager
The original code used rmdir to remove directories which could fail if
directory is not empty
Using rename operation instead allows moving directories to trash
location while preserving contents
This fixes potential data loss when trashing non-empty directories

fix: 将目录操作中的 rmdir 替换为 rename

在回收站管理器中处理目录操作时将 rmdir 改为 rename
原始代码使用 rmdir 删除目录,如果目录不为空则会失败
使用 rename 操作可以将目录移动到回收站位置同时保留内容
这修复了清空非空目录时可能出现的数据丢失问题
2025-09-29 13:30:11 +08:00
github-actions[bot] b7f1f8afef chore: New release 5.7.23
Log:
2025-09-25 17:44:36 +08:00
yeshanshan c5be272ad8 fix: fix dconfig static variable release issue
Fixed dconfig exit crash caused by static variable destruction order
1. Added null pointer check before accessing m_config in updateValue
method to prevent accessing destroyed objects
2. Added m_config.storeRelaxed(nullptr) in destructor to clear the
atomic pointer
3. Added early return checks in connect and updateValue methods when
config is null
4. Updated default value for p_rules to use proper unicode string
literal

The issue occurred because static dconfig objects were being destroyed
after the QCoreApplication instance, leading to attempts to access
already destroyed DConfig objects during cleanup. The fix ensures proper
null checking and pointer cleanup to prevent crashes during application
exit.

Log: Fixed application exit crash related to dconfig static variables

Influence:
1. Test application normal startup and shutdown
2. Verify dconfig functionality still works correctly
3. Test with multiple dconfig instances
4. Verify no crashes occur during application termination
5. Test configuration value changes and updates

fix: 修复dconfig静态变量释放导致的退出异常

修复了由静态变量销毁顺序引起的dconfig退出崩溃问题
1. 在updateValue方法中添加空指针检查,防止访问已销毁的对象
2. 在析构函数中添加m_config.storeRelaxed(nullptr)来清理原子指针
3. 在connect和updateValue方法中添加config为null时的提前返回检查
4. 更新p_rules的默认值为正确的unicode字符串字面量

问题出现在静态dconfig对象在QCoreApplication实例之后被销毁时,导致在清
理过程中尝试访问已销毁的DConfig对象。修复确保进行适当的空值检查和指针清
理,以防止应用程序退出时的崩溃。

Log: 修复了与dconfig静态变量相关的应用程序退出崩溃问题

Influence:
1. 测试应用程序正常启动和关闭
2. 验证dconfig功能仍然正常工作
3. 测试多个dconfig实例的情况
4. 验证应用程序终止时不会发生崩溃
5. 测试配置值更改和更新功能

PMS: BUG-324689
2025-09-25 15:26:44 +08:00
wangshaojun d2d91a87a3 feat: 增加服务器教育版和国防版
增加系统类型 服务器教育版 服务器国防版 枚举

Log: 增加服务器教育版和国防版
Task: https://pms.uniontech.com/task-view-381681.html
Influence: 系统类型
Change-Id: I2806d86ff42d31199fc7a144bf9e8b0fc69c5fcd
2025-09-25 13:37:27 +08:00
JiDe Zhang 440fca2efd fix: fix heap-use-after-free issue
The `QString::toUtf8().constData()` returns a pointer to the internal
data of a temporary `QByteArray` object. This `QByteArray` object
is immediately destroyed after the call to `constData()`, making the
returned pointer invalid. Subsequent uses of this pointer would result
in a heap-use-after-free error.

To fix this, the `QByteArray` object returned by `toUtf8()` is now
stored in a local variable, ensuring that the data it contains remains
valid for the duration of its scope.

Influence:
1. Run all existing D-Bus related tests to ensure the fix does not
introduce regressions.
2. Specifically test the scenarios where `DSGApplication::id()` is
called before `QCoreApplication` initialization.

fix: 修复堆释放后使用问题

`QString::toUtf8().constData()` 返回一个指向临时 `QByteArray` 对象内部数
据的指针。这个 `QByteArray` 对象在调用 `constData()` 后立即被销毁,导致
返回的指针无效。随后使用此指针会导致堆释放后使用错误。

为了解决这个问题,由 `toUtf8()` 返回的 `QByteArray` 对象现在存储在一个局
部变量中,从而确保其包含的数据在其作用域内保持有效。

Influence:
1. 运行所有现有的 D-Bus 相关测试,以确保此修复不会引入回归。
2. 专门测试在 `QCoreApplication` 初始化之前调用 `DSGApplication::id()`
的场景。
2025-09-23 17:54:45 +08:00
wjyrich bcd59cb836 fix: fix trash validation for symlinks
The condition for checking if a file can be moved to trash was
incorrectly rejecting symlinks that point to files on the same
filesystem as the trash directory. The original condition only allowed
moving files when the storage info matched the trash storage info, but
this failed for symlinks since their storage info differs from their
target.

The fix adds an additional check to allow symlinks when they are on
the same filesystem as the trash directory, ensuring proper trash
functionality for symbolic links while maintaining the original
validation for regular files.

fix: 修复符号链接的垃圾箱验证问题

原本检查文件是否能移动到垃圾箱的条件错误地拒绝了指向与垃圾箱目录相同文
件系统的符号链接。原始条件仅当存储信息与垃圾箱存储信息匹配时才允许移动文
件,但这对于符号链接会失败,因为它们的存储信息与其目标不同。

修复添加了额外检查,允许符号链接在与垃圾箱目录相同的文件系统上时通过验
证,确保符号链接的正常垃圾箱功能,同时保持对常规文件的原始验证。
2025-09-23 05:03:46 +00:00
Wang Zichong c9a2ad0b37 feat: DPinyin::firstLetters support set ToneStyle
允许为 firstLetters() 设置声调选项,便于获取完全不带声调的拼音首字母

Log:
2025-09-18 15:35:03 +08:00
Wang Yu efb8be8218 fix: add fallback type conversion in demarshall function
- Added else branch to handle non-QDBusArgument values with type conversion
- Improves property value handling when direct DBus unmarshalling is not applicable

Log: add fallback type conversion in demarshall function
pms: BUG-332055
2025-09-12 17:54:36 +08:00
github-actions[bot] fe1e9715a2 chore: New release 5.7.22
Log:
2025-09-04 20:06:39 +08:00
yeshanshan 39b91e4b79 fix: resolve non-reproducible DBUS code generation issue
Changed QSet to QStringList for annotations collection to ensure
deterministic output order
Added removeDuplicates() call to maintain uniqueness while preserving
order
This fixes non-reproducible builds caused by QSet's unpredictable
iteration order

Log: Fixed DBUS code generation reproducibility issue

Influence:
1. Verify DBUS interface code generation produces identical output for
same inputs
2. Test with multiple interface definitions containing annotations
3. Check build reproducibility across different systems

fix: 修复DBUS代码生成不可重复的问题

将注解集合从QSet改为QStringList以确保输出顺序确定性
添加removeDuplicates()调用在保持顺序的同时确保唯一性
修复了由于QSet迭代顺序不可预测导致的构建不可重复问题

Log: 修复了DBUS代码生成不可重复的问题

Influence:
1. 验证相同输入下DBUS接口代码生成是否产生相同输出
2. 测试包含多个注解的接口定义
3. 检查不同系统间的构建可重复性
2025-08-19 18:42:54 +08:00
github-actions[bot] 2ffc340446 chore: New release 5.7.21
Log:
2025-08-14 20:27:53 +08:00
yeshanshan 2cbf1b55d0 feat: add deprecation ignore support for DTK
Added D_IGNORE_DEPRECATIONS macro to suppress deprecation warnings in
DTK core
1. Define D_IGNORE_DEPRECATIONS for static library builds
2. Define D_IGNORE_DEPRECATIONS when building DTK core library
3. Added conditional compilation to skip deprecation attributes when
D_IGNORE_DEPRECATIONS is defined
4. Maintains backward compatibility while allowing projects to ignore
deprecated APIs

This change helps projects transition away from deprecated APIs without
immediate warning noise while maintaining the deprecation markers for
new development

Influence:
1. Test building with D_IGNORE_DEPRECATIONS defined to verify
deprecation warnings are suppressed
2. Test building without D_IGNORE_DEPRECATIONS to ensure deprecation
warnings still appear
3. Verify both static and dynamic library builds work correctly with
this change

feat: 添加DTK废弃接口忽略支持

新增D_IGNORE_DEPRECATIONS宏用于抑制DTK核心中的废弃警告
1. 为静态库构建定义D_IGNORE_DEPRECATIONS
2. 构建DTK核心库时定义D_IGNORE_DEPRECATIONS
3. 添加条件编译,当D_IGNORE_DEPRECATIONS定义时跳过废弃属性
4. 保持向后兼容性同时允许项目忽略废弃API

此变更帮助项目在不立即处理废弃警告的情况下逐步迁移废弃API,同时保留废弃
标记供新开发使用

Influence:
1. 测试定义D_IGNORE_DEPRECATIONS时的构建,验证废弃警告被抑制
2. 测试未定义D_IGNORE_DEPRECATIONS时的构建,确保废弃警告仍然显示
3. 验证静态库和动态库构建在此变更后都能正常工作
2025-08-14 11:36:15 +00:00
github-actions[bot] befdd9f0d2 chore: New release 5.7.20
Log:
2025-07-31 20:29:37 +08:00
yeshanshan e900940de3 fix: resolve compilation warnings and Qt6 compatibility issues
1. Replaced QScopedPointer with std::unique_ptr for better memory
management and consistency
2. Fixed time handling in DRecentManager for Qt6 by using QTimeZone
3. Added missing memory header for smart pointers

These changes address compiler warnings and ensure proper functionality
across both Qt5 and Qt6 versions, while modernizing the codebase with
standard C++ features.

fix: 修复编译警告和Qt6兼容性问题

1. 使用std::unique_ptr替代QScopedPointer以获得更好的内存管理和一致性
2. 在DRecentManager中修复Qt6的时间处理问题,使用QTimeZone
3. 添加缺失的memory头文件以支持智能指针

这些修改解决了编译器警告问题,并确保代码在Qt5和Qt6版本中都能正常工作,同
时使用标准C++特性使代码更现代化。
2025-07-28 18:22:26 +08:00
yeshanshan 97e66aaaf4 refactor: improve D-Bus resource management with RAII
1. Added custom deleters for D-Bus resources (DBusError, DBusConnection,
DBusMessage)
2. Replaced manual resource cleanup with std::unique_ptr RAII wrappers
3. Simplified error handling by removing repetitive cleanup code
4. Improved memory safety by ensuring resources are always released
5. Added detailed documentation for getId() function explaining the
libdbus-1 usage

The changes ensure proper resource management even in error cases and
make the code more maintainable by eliminating manual cleanup. This is
particularly important for D-Bus operations that may fail at multiple
points. The RAII approach prevents resource leaks and makes the code
more robust.

refactor: 使用 RAII 改进 D-Bus 资源管理

1. 为 D-Bus 资源(DBusError, DBusConnection, DBusMessage)添加自定义删除器
2. 使用 std::unique_ptr RAII 包装器替代手动资源清理
3. 通过移除重复的清理代码简化错误处理
4. 通过确保资源总是被释放来提高内存安全性
5. 为 getId() 函数添加详细文档说明 libdbus-1 的使用

这些变更确保了即使在错误情况下也能正确处理资源,并通过消除手动清理使代码
更易于维护。这对于可能在多个点失败的 D-Bus 操作尤为重要。RAII 方法防止了
资源泄漏并使代码更加健壮。
2025-07-08 17:10:57 +08:00
yeshanshan 80a5f3edce fix: use QCoreApplication for application name
Changed from using qApp->applicationName() to
QCoreApplication::applicationName() for getting the application name.
This provides better consistency and reliability as QCoreApplication is
the base class and ensures the method is always available, while qApp
macro might not be defined in all contexts. The change maintains the
same functionality but with more robust implementation.

fix: 使用 QCoreApplication 获取应用名称

将 qApp->applicationName() 改为 QCoreApplication::applicationName() 来获
取应用名称。这提供了更好的一致性和可靠性,因为 QCoreApplication 是基类并
确保方法始终可用,而 qApp 宏在某些上下文中可能未定义。此更改保持了相同的
功能但实现了更健壮的实现。
2025-07-08 10:33:19 +08:00
github-actions[bot] df43a12293 chore: New release 5.7.19
Log:
2025-07-03 13:22:37 +00:00
yeshanshan 5042e3af39 fix: add security hardening flags to build configuration
Added security hardening compiler and linker flags to the Debian build
rules
1. Enabled all hardening options via DEB_BUILD_MAINT_OPTIONS
2. Added -Wall warning flags for C/C++ compilation
3. Added secure linker flags including RELRO, immediate binding, and
noexecstack
4. These changes improve security by enabling modern compiler
protections and reducing potential attack surfaces

fix: 在构建配置中添加安全加固标志

在 Debian 构建规则中添加了安全加固的编译器和链接器标志
1. 通过 DEB_BUILD_MAINT_OPTIONS 启用所有加固选项
2. 为 C/C++ 编译添加 -Wall 警告标志
3. 添加安全的链接器标志包括 RELRO、立即绑定和 noexecstack
4. 这些更改通过启用现代编译器保护和减少潜在攻击面来提高安全性
2025-07-03 12:59:45 +00:00
yeshanshan 72c74eec4b refactor: replace QtDBus with libdbus-1 in dsgapplication
The changes replace QtDBus implementation with direct libdbus-1 calls
in dsgapplication.cpp for better control and performance. Key changes
include:
1. Added libdbus-1-dev as build dependency in debian/control
2. Updated CMakeLists.txt to find and link against libdbus-1
3. Implemented new utility functions checkDBusServiceActivatable and
callDBusIdentifyMethod using libdbus-1 API
4. Removed QtDBus dependencies and replaced with direct D-Bus calls
5. Added proper error handling and resource cleanup for D-Bus
connections

This change provides more direct control over D-Bus interactions
and removes QtDBus dependency overhead while maintaining the same
functionality.

refactor: 在 dsgapplication 中用 libdbus-1 替换 QtDBus

这些更改用直接的 libdbus-1 调用替换了 dsgapplication.cpp 中的 QtDBus 实
现,以获得更好的控制和性能。主要变更包括:
1. 在 debian/control 中添加了 libdbus-1-dev 作为构建依赖
2. 更新 CMakeLists.txt 以查找并链接 libdbus-1
3. 使用 libdbus-1 API 实现了新的实用函数 checkDBusServiceActivatable 和
callDBusIdentifyMethod
4. 移除了 QtDBus 依赖项并替换为直接的 D-Bus 调用
5. 为 D-Bus 连接添加了适当的错误处理和资源清理

此变更提供了对 D-Bus 交互更直接的控制,在保持相同功能的同时移除了 QtDBus
依赖开销。
2025-07-03 20:38:54 +08:00
github-actions[bot] 303f32e5c7 chore: New release 5.7.18
Log:
2025-06-27 17:18:10 +08:00
yeshanshan 374dca6299 fix: make version parameter optional in release workflow
1. Changed version parameter from required to optional in auto-
release.yml
2. Fixed spec file formatting for Version and Release fields
3. Added %{?dist} macro to Release field for better RPM compatibility

The changes make the release workflow more flexible by allowing version-
less releases when needed. The spec file formatting improvements ensure
consistency with RPM packaging standards, while the %{?dist} macro helps
with proper package distribution tagging.

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

1. 在 auto-release.yml 中将版本参数从必填改为可选
2. 修复了 spec 文件中 Version 和 Release 字段的格式
3. 在 Release 字段中添加了 %{?dist} 宏以提升 RPM 兼容性

这些改动使得发布工作流在需要时可以更灵活地进行无版本发布。spec 文件的格
式改进确保了与 RPM 打包标准的一致性,而 %{?dist} 宏有助于正确的软件包分
发标记。
2025-06-27 16:43:48 +08:00
yeshanshan 7bf69bc64d fix: copy cachePrefix in DConfigFile copy constructor
1. Added missing copy of cachePrefix member when copying DConfigFile
objects
2. The cachePrefix was being lost during copy operations which could
lead to incorrect cache behavior
3. This ensures complete and proper copying of all cache-related data

fix: 在 DConfigFile 拷贝构造函数中复制 cachePrefix

1. 添加了对 cachePrefix 成员的拷贝操作,在复制 DConfigFile 对象时该成员
之前被遗漏
2. 之前拷贝操作会丢失 cachePrefix,可能导致缓存行为异常
3. 此修改确保所有缓存相关数据都能被完整正确地拷贝
2025-06-27 07:12:55 +00:00
yeshanshan 3446cbed57 fix: improve logging rules environment variable handling
1. Modified condition to check for both DTK_DISABLED_LOGGING_RULES and
QT_LOGGING_RULES environment variables
2. This change prevents logging rules from being initialized when either
variable is set
3. Ensures better compatibility with Qt's standard logging configuration
system
4. Maintains backward compatibility while adding support for standard Qt
logging control

fix: 改进日志规则环境变量处理

1. 修改条件以同时检查 DTK_DISABLED_LOGGING_RULES 和 QT_LOGGING_RULES 环
境变量
2. 当任一变量设置时,阻止日志规则初始化
3. 确保与 Qt 标准日志配置系统更好的兼容性
4. 在添加对标准 Qt 日志控制支持的同时保持向后兼容
2025-06-27 12:20:14 +08:00
github-actions[bot] 629c6ebe01 chore(rpm): New release 5.7.17
Log:
2025-06-19 10:21:56 +08:00
asterwyx 609cd6570a chore: update .syncexclude
Exclude CHANGELOG.md.
2025-06-18 16:41:59 +08:00
Yixue Wang 9f5336d761 chore: add license for VERSION.in
Add CC0-1.0 license for VERSION.in
2025-06-09 10:33:59 +08:00
Cryolitia 0d94be1501 fix(ci): .deepin@main -> .deepin@master
Log
2025-06-06 17:34:51 +08:00
Cryolitia b705036db2 feat(ci): add auto release
Log:
2025-06-06 17:24:18 +08:00
Yixue Wang 81e3d9c093 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-06 17:11:20 +08:00
Ye ShanShan d45b37af60 chore: bump version to 5.7.16
update changelog to 5.7.16
2025-05-19 09:26:14 +00:00
Ye ShanShan cac44391a0 fix: add missing UosMilitary edition type cases
Added case 9 to return UosMilitary/UosMilitaryS in uosEditionType
function
The change was necessary because the system needs to recognize edition
type 9 as a valid military edition variant
This ensures proper handling of all supported UOS edition types in the
system

fix: 添加缺失的 UosMilitary 版本类型处理

在 uosEditionType 函数中添加了 case 9 返回 UosMilitary/UosMilitaryS 的
处理
此变更是必要的,因为系统需要将类型9识别为有效的军事版本变体
这确保了系统中对所有支持的 UOS 版本类型的正确处理

pms: BUG-316837
2025-05-19 09:04:06 +00:00
Ye ShanShan d8ded4a51d chore: bump version to 5.7.15
update changelog to 5.7.15
2025-05-08 10:48:19 +00:00
Ye ShanShan 579d86a5f1 fix: correct bitwise operation in dconfig status tracking
1. Fixed incorrect bitwise AND operation in property status tracking
2. Changed `fetchAndAndOrdered(1 << index)` to `fetchAndAndOrdered(~(1
<< index))`
3. This ensures proper bit clearing when unsetting property flags
4. The change was made in both the generated header and the generator
tool
5. Without this fix, status tracking would incorrectly set bits instead
of clearing them

fix: 修正 dconfig 状态跟踪中的位操作

1. 修复了属性状态跟踪中错误的位与操作
2. 将 `fetchAndAndOrdered(1 << index)` 改为 `fetchAndAndOrdered(~(1
<< index))`
3. 确保在取消设置属性标志时能正确清除位
4. 修改同时应用于生成的头部文件和生成器工具
5. 若不修复此问题,状态跟踪会错误地设置位而非清除它们
2025-05-08 09:46:40 +00:00
Ye ShanShan 8e51803b6e chore: update REUSE license file patterns
1. Added new file patterns to the REUSE license configuration
2. Included cmake/*.in and misc/*.in files under CC0-1.0 license
3. Maintains consistent licensing documentation for build system files

chore: 更新 REUSE 许可证文件模式

1. 在 REUSE 许可证配置中添加了新的文件模式
2. 将 cmake/*.in 和 misc/*.in 文件纳入 CC0-1.0 许可证范围
3. 保持构建系统文件许可文档的一致性
2025-05-07 03:45:01 +00:00
Ye ShanShan 7319297676 fix: add QPointer check for parent object safety
1. Added QPointer include for tracking parent object lifecycle
2. Changed parent initialization to nullptr in constructor for safety
3. Implemented parent object tracking using QPointer to prevent dangling
pointers
4. Added logic to handle parent object deletion during async operation
5. Added proper parent reassignment if parent still exists after
operation

These changes prevent potential crashes when parent objects are deleted
during asynchronous configuration operations, particularly important in
multi-threaded scenarios where parent objects might be destroyed while
operations are pending.

fix: 添加 QPointer 检查确保父对象安全

1. 添加 QPointer 头文件用于跟踪父对象生命周期
2. 构造函数中将父对象初始化为 nullptr 提高安全性
3. 使用 QPointer 实现父对象跟踪,防止悬垂指针
4. 添加处理异步操作期间父对象被删除的逻辑
5. 操作完成后如果父对象仍存在则正确重新设置父对象

这些修改防止了在异步配置操作期间父对象被删除时可能导致的崩溃,对于多线程
场景下父对象可能在操作挂起时被销毁的情况尤为重要。
2025-05-07 03:45:01 +00:00
JiDe Zhang e619ccdba3 chore: bump version to 5.7.14
update changelog to 5.7.14
2025-04-12 17:55:30 +08:00
JiDe Zhang 8db10c9145 fix: resolve compilation failure on Qt 6.9
Updated the dvtablehook.h file to adjust the typedef for Fun2ReturnType
based on changes in Qt 6.9 interfaces. Additionally, the main.cpp
file now casts the unicode value to short to prevent type issues.
These changes are necessary to ensure compatibility with the latest
Qt framework and to resolve the build issues that arise from interface
modifications.

修复: 解决在Qt 6.9上的编译失败

更新了dvtablehook.h文件,以根据Qt 6.9接口的变化调整Fun2ReturnType的
typedef。此外,main.cpp文件现在将unicode值转换为short,以防止类型问题。
这些更改对于确保与最新Qt框架兼容以及解决接口修改引起的构建问题是必要的。
2025-04-12 17:55:30 +08:00
Ye ShanShan d6dd19e5f6 chore: bump version to 5.7.13
update changelog to 5.7.13
2025-03-20 18:07:22 +08:00
JiDe Zhang bb9e5bead2 fix: add copyright for dconfig_org_deepin_dtk_preference.hpp
This is a generate file, so copyright is none.
2025-03-19 11:41:21 +08:00
JiDe Zhang e8eedb9efe feat: supports create generic config by dconfig2cpp 2025-03-06 20:59:55 +08:00
JiDe Zhang c250cf2111 fix: build failed on Qt6
create dconfig2cpp's config failed if not assign application id.
Add missing parameter in dconfig2cpp generated code.
2025-03-06 20:59:55 +08:00
Ye ShanShan 06bb511db1 chore: bump version to 5.7.12
update changelog to 5.7.12
2025-03-06 17:40:22 +08:00
JiDe Zhang e6985b9351 feat: dconfig2cpp always add bindableFoo functions on Qt6
Direct string literal for the property name, because the literal was
use on the Q_PROPERTY macro, so use the hex encode for the property name
strings can't avoid the Chinese text codec problems.
2025-03-06 17:18:56 +08:00
jingshenghao 5a85299d3e 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:02:08 +08:00
Ye ShanShan fd671e2509 chore: bump version to 5.7.11
update changelog to 5.7.11
2025-02-27 21:06:33 +08:00
JiDe Zhang 8b8bb8512c feat: dconfig2cpp generated codes supports qml
On the DtkDeclarative's DConfigWrapper, it needs know whether the value
is default, so always create the *IsDefaultValue functions.
2025-02-25 09:53:04 +08:00
zhangkun d86c290665 feat: export ProductType for QML
as title

pms: BUG-303845
2025-02-24 18:36:08 +08:00
JiDe Zhang 6dfb3c767a feat: async get dconfig value for DLog
Avoid block the application if DConfig's IO is slow.
2025-02-20 19:45:06 +08:00
JiDe Zhang a9a569b42a feat: support auto generate the Qt code from a dconfig's json
To help developer get/set dconfig in the non GUI thread.
2025-02-20 19:45:06 +08:00
Ye ShanShan 90b86255cb chore: bump version to 5.7.10
update changelog to 5.7.10
2025-02-13 11:01:39 +00:00
deepin-ci-robot 1aad463185 chore: update changelog
Release 5.7.9.
2025-01-23 17:43:55 +08:00
deepin-ci-robot 5d2719af93 chore: update changelog
Release 5.7.8.
2025-01-14 20:02:03 +08:00
deepin-ci-robot 85bd895d38 chore: update changelog
Release 5.7.7.
2025-01-09 18:33:20 +08:00
deepin-ci-robot d518836e22 chore: update changelog
Release 5.7.6.
2025-01-02 06:41:42 +00:00
deepin-ci-robot 9e8e68f63c chore: update changelog
Release 5.7.5.
2024-12-17 09:55:21 +08:00
Ye ShanShan 951314d59c fix: double value is converted to int for DConfig
MetaType of 1.0 is qlonglong instead of double in json file.
We don't convert if source value is double.
2024-12-12 17:58:32 +08:00
Ye ShanShan 53be287abf fix: pidfd leak
pidfd must be closed by caller according QDBusUnixFileDescriptor.

pms: BUG-293049
2024-12-10 09:10:47 +08:00
deepin-ci-robot 7b15212ee8 chore: update changelog
Release 5.7.4.
2024-12-04 18:15:44 +08:00
Yixue Wang e1f300f68c fix: compilation on Qt 6.8.1
Fix beginEntryList.
2024-12-03 14:13:18 +08:00
Ye ShanShan ca52ff7a2c fix: hasVtable is incorrect when destructing
Destruct function should be called by 'autoCleanVtable' instead of
'callOriginalFun'.
'glostVtable' should be delete before calling origin destruct,
because 'resetVtable' maybe called when destructing origin destruct.

pms: BUG-368399
2024-12-02 17:45:48 +08:00
deepin-ci-robot fc0280e7b9 chore: update changelog
Release 5.7.3.
2024-11-22 10:28:21 +08:00
deepin-ci-robot 7897313cce chore: update changelog
Release 5.7.2.
2024-11-15 05:47:02 +00:00
deepin-ci-robot beb4cd331d chore: update changelog
Release 5.7.1.
2024-10-31 10:24:56 +08:00
ck c234a5cb38 fix(build): debian/rule use tab instead of space
space ==> tab
2024-10-23 10:58:39 +08:00
Zhang Dingyuan 2e0b67ec2d feat: support Qt 6.8
support qt 6.8

Log:
2024-10-22 11:20:33 +00:00
ck 918c40f616 fix(dlog): JournalAppender not work
BUILD_WITH_SYSTEMD not defined
2024-10-18 14:14:35 +08:00
groveer 280791db27 fix(util): error appid from `getAppIdFromAbsolutePath`
Log: tmp变量读出来的字符串多带了一个字符
2024-09-09 10:38:13 +08:00
Robert Lv 40cbafcf8f fix: DDBusInterface signal loss
Fix the issue of no signal when DDBusInterface object properties change
2024-09-09 10:37:49 +08:00
renbin b0efc5a796 fix: remove unnecessary link libraries
These two libraries are used to detect text encoding,
but they are actually loaded dynamiclly.
Not need to link libraries.
2024-09-09 10:37:18 +08:00
Whale107 797101ccda
feat: 增加智能终端设备类型 (#434)
增加智能终端设备类型

Log:
2024-08-23 06:24:12 +00:00
deepin-ci-robot e73c73c862 chore: update changelog
Release 5.6.34.
2024-08-21 16:47:21 +08:00
deepin-ci-robot 2ebb0a17d2 chore: update changelog
Release 5.6.32.
2024-07-10 11:08:37 +08:00
ck 1a6e919cc5 refactor: log files move to dtklog
Issue: linuxdeepin/dtk#182

dtklog: https://github.com/linuxdeepin/dtklog
2024-07-05 14:13:31 +08:00
deepin-ci-robot 51feaf445c chore: update changelog
Release 5.6.31.
2024-06-27 17:56:51 +08:00
zsien a1add007e3 chore: use '&&' and '||' instead of 'and' and 'or'
一些项目使用了 -fno-operator-names,会导致编译失败
2024-06-07 15:42:45 +08:00
deepin-ci-robot f326ac4c20 chore: update changelog
Release 5.6.30.
2024-05-31 15:27:33 +08:00
ck 6f02ee5d78 chore: add nullptr check
nullptr check
2024-05-30 10:56:46 +08:00
ck 10bd3842bb fix(build): build faild on Qt 6.7.1
QAbstractFileEngine::FileTime ==> QFile::FileTime
2024-05-28 13:13:09 +08:00
ck 052f52ba00 chore: fallback to dsgconfig value
fallback to default dsgconfig value
2024-05-21 16:25:34 +08:00
Ye ShanShan c56b7ea891 fix: crashed when access DSGApplication::id early
Add fallback, using fileName or cmdline as AppId.
Remove assert for empty appId.
2024-05-21 10:13:51 +08:00
ck 653f6dce7e refactor: remove LoggingRules interface
- 移除相关接口, 默认启用(可以用 DTK_DISABLED_LOGGING_RULES 禁用)
- 优先使用 dsgAppId , 用户可以通过 DTK_LOGGING_FALLBACK_APPID 指定
  fallbackAppId
- 有配置过 rules 时, 优先使用(即非默认值优先)
- fallbackConfig 发生变化时会检查 dsgConfig 是否修改过,是则忽略
2024-05-17 09:56:39 +08:00
ck c876a2a2a9 chore: loggingrules config move to preference
org.deepin.dtk.logginerules ==> org.deepin.dtk.preference
如果 DConfig 无效就不清空环境变量
2024-05-17 09:56:39 +08:00
覃本学 f21de0440b fix: 修复日志格式时间戳显示异常问题
适配qt的日志格式
%{time yyyy-MM-ddTHH:mm:ss.zzz} ==> %{time}{yyyy-MM-ddTHH:mm:ss.zzz}

Log: 修复日志格式时间戳显示异常问题
Bug: https://pms.uniontech.com/bug-view-236239.html
Influence: 使用DLogManager的应用日志输出格式
2024-05-17 09:56:39 +08:00
tanfeng 830c444024 feat: DeepinType类型增加军用版
DeepinType类型增加军用版

Log: DeepinType类型增加军用版
Task: https://pms.uniontech.com/task-view-316703.html
Influence: DeepinType类型
Change-Id: I9db5a3d14eebab69b5cac44fbfb0d2a09d8d84c3
2024-05-17 09:56:39 +08:00
YinJie 56117af57e fix: 修复计算 build 版本号错误的问题
场景如下(完整版本号 -> 构建版本号):
5.6.8 -> 0
5.6.8.7 -> 7
5.6.8+u001 -> 1
5.6.8.7+u001 -> 7
5.6.8.0+u001 -> 0

Log:
Influence: 构建版本号(BUILD_VERSION )
2024-05-17 09:56:39 +08:00
YinJie 8ba05a2f80 feat: 增加registerLoggingRulesWatcher接口
功能:监听 dconfig 的值然后设置应用的日志级别
目的:
1.取消QT_LOGGING_RULES需要在创建 application之前处理
因为QLoggingRegistry在构造函数中获取环境变量的值后不会监听环境变量的变化.
目前直接使用applicationName当做appId 的做法不可行.
2.不和应用的 applicationName耦合目前大部分应用的applicationName和dconfig
的appId是不一样的,需要修改应用的名字
可能存在多个 application 使用通过一个 dconfig
的情况,修改applicantionName的方法不可行.
PS:从 DConfig 获取默认 appId 的逻辑上看, DSGApplication应用会有问题
3.开发者可以选择是否需要设置以及监听日志级别变动

Log:
Task: https://pms.uniontech.com/task-view-303379.html
2024-05-17 09:56:39 +08:00
chenjun 63a62b14f4 fix: 从文件中读取deepinType和productType值时因为权限问题会失败
安装了三方管控应用时,从文件中读取deepinType和productType值时因为权限问题会失败,需要重新读取一次

Log: 修复第一次读取配置文件失败导致无法显示系统版本和说明问题
Influence: 正常显示版本和说明
2024-05-17 09:56:39 +08:00
xuxin af83f1b4a8 fix: lshw查询内存大小时返回多元素数组,修正解析过程
调整json结果解析过程

Log: 在不同场景下lshw可能返回多个元素
Influence: DSysInfo::memoryInstalledSize解析过程
Bug: https://pms.uniontech.com/bug-view-228681.html
Change-Id: I51030f037fa272ef9d510265524e5ec934c1f9bd
2024-05-17 09:56:39 +08:00
覃本学 bc498f61fe feat: 允许基于dtk开发的应用动态控制其日志输出等级
在运行中,不需要重启应用,也可以通过配置项控制日志输出等级
注: 应用的applicationName 需要和dconfig安装时的appid等同方可识别
配置规则等同于QT_LOGGING_RULES

注意:由于 dtk/dtk6 的存在 meta 文件 在 libdtkdata 中安装

Log: 允许基于dtk开发的应用动态控制其日志输出等级
Influence: 允许基于dtk开发的应用动态控制其日志输出等级
Task: https://pms.uniontech.com/task-view-307567.html
      https://pms.uniontech.com/task-view-305899.html
2024-05-17 09:56:39 +08:00
deepin-ci-robot 393e684baf chore: update changelog
Release 5.6.29.
2024-05-16 10:27:34 +08:00
Ye ShanShan 861a35a935 fix: DConfigFile is invalid when AppId is empty
Empty is used in dde-dconfig-daemon, and it is valid.
2024-05-14 11:06:37 +08:00
Ye ShanShan 5f6d336933 fix: DConfig add check for AppId
user can open non-root controlled files when `appId` is relative path.

Issue: https://bugzilla.suse.com/show_bug.cgi?id=1211374
2024-05-13 13:15:57 +08:00
Ye ShanShan 73aa1884c0 chore: remove warning for dbusxml2cpp in qt6
adapt to qt6.
2024-05-13 11:00:36 +08:00
deepin-ci-robot 8e736edc9c chore: update changelog
Release 5.6.28.
2024-04-30 15:40:05 +08:00
hillwoodroc 45e8e60649 fix: fix undefined reference errors on spdlog 1.14.0
Support spdlog 1.14.0

Log: spdlog 1.14.0 add string view overloads for logger accessor. We should include
more headers for this change in dtkcore.
2024-04-29 14:16:25 +08:00
deepin-ci-robot 5e93ad12c9 chore: update changelog
Release 5.6.27.
2024-04-23 09:23:40 +08:00
groveer fe43eb823d fix(qdbusxml2cpp): support qt 6.7
as title

Log:
2024-04-15 17:30:40 +08:00
Ye ShanShan 70d034165c fix: lossing value when save DConfig
Blocking caller until it's finished, otherwise
it maybe lose value when application is quit early.
2024-03-27 19:04:52 +08:00
deepin-ci-robot 391320dd81 chore: update changelog
Release 5.6.26.
2024-03-27 14:24:02 +08:00
deepin-ci-robot bd6065d97a chore: update changelog
Release 5.6.25.
2024-03-11 15:32:06 +08:00
YeShanShan d35b71e346 fix: DConfig add check for name
user can open non-root controlled files when `name` is relative path.

Issue: https://bugzilla.suse.com/show_bug.cgi?id=1211374
2024-03-05 15:20:58 +08:00
YeShanShan 101e1f2dd3 feat: support to set appId for DConfig
It's useful for generic config to explicitly specify application id.
2024-03-05 11:46:31 +08:00
ck 558d64be4e chore: fix docs typo
dic ==> dci
2024-03-04 19:22:19 +08:00
deepin-ci-robot 9c96f05fdb chore: update changelog
Release 5.6.22
2024-01-12 14:20:35 +08:00
ck 8c4f4364b6 chore: remove unused code
remove unused global functions
2024-01-10 11:14:25 +08:00
deepin-ci-robot 7d4ea9d078 chore: update changelog
Release 5.6.21.
2024-01-09 14:23:00 +08:00
chenhongtao a94a528d86 feat: allow skip including headers of annotations
Log:
Issue: https://github.com/linuxdeepin/dtk/issues/147
2023-12-19 14:33:36 +08:00
ck 6afbef5890 chore: fix relative path invalid link
```
 dci --export ./ ./xxx.dci
 # invalid symlink ./1.webp -> 3/36/normal.light/3/1.webp
 # should be       ./1.webp -> ../../normal.light/3/1.webp
```
2023-12-13 10:00:26 +08:00
bluesky 7eec6f3000 chore: remove decltype(auto) for dutil
Log: remove decltype(auto)
2023-12-13 09:59:02 +08:00
YeShanShan af8b7666ff fix: app blocked when AM is unavailable
We don't block application when AM is unavailable.
2023-12-08 19:12:59 +08:00
deepin-ci-robot fea15882e9 chore: update changelog
Release 5.6.20.
2023-11-28 17:55:09 +08:00
chenhongtao 1dfa31cfec chore: add dtk dbus generate function
Log: steal from qt
2023-11-17 09:37:28 +08:00
ck f790bab887 fix: log files limit not work
type convert failed
2023-11-14 15:52:35 +08:00
ck c51d1af37c chore: keep order when deduplication
set is unordered, results are inconsistent
2023-11-09 15:35:53 +08:00
chenhongtao 75c9a19f66 feat(dstandardpaths): add XDG_STATE_HOME
this folder is used to storage history and logs

Log:
2023-11-03 13:19:18 +08:00
ck a7dd2a8678 chore: Implement DSGApplication::getId
- Get appid from dde-application-manager
 Also available in the linglong box due to using pidfd
2023-10-30 14:05:03 +08:00
ComixHe 683df841ad feat: add utils function
1. get desktop(application)Id from absolute path.
2. get absolute path from desktop(application)Id.
3. escape string to special format which is dbus required.
4. unescape dbus object path

Signed-off-by: ComixHe <heyuming@deepin.org>
2023-10-30 09:53:43 +08:00
deepin-ci-robot 387340bda6 chore: update changelog
Release 5.6.19.
2023-10-24 02:33:26 +08:00
wangfei 9c3e18ebf3 chore: add flag UserPublic
add flag UserPublic to Meta file for managing permission among users.

Issue: https://github.com/linuxdeepin/developer-center/issues/5928
2023-10-23 10:26:11 +08:00
Gary Wang c7a4732115 fix: correct Dtk6SettingsToolsMacros.cmake path
* fix: correct Dtk6SettingsToolsMacros.cmake path

修正 Dtk6SettingsToolsMacros.cmake 路径不正确的问题
同时避免硬编码版本号到 6

Log:
2023-10-23 10:21:41 +08:00
YeShanShan f29a571b83 fix: Type error for qdbusxml2cpp
We get typeName using `QMetaType::name` in qt6.
  filename of `moc` is changed from `xxx.moc` to `moc_xxx.cpp`, and
it is consistent with qt6.
https://code.qt.io/cgit/qt/qtbase.git/tree/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp?h=dev#n221
2023-10-23 00:19:32 +08:00
deepin-ci-robot d990485a29 chore: update changelog
Release 5.6.18.
2023-10-18 15:16:21 +08:00
ck 5f8a646ba3 chore: dpinyin tweak
- remove duplicate results when permuting and combining Pinyin
- limit the number of results to avoid of OOM
- ch2py print elapsed time

Issue: https://github.com/linuxdeepin/dtk/issues/109
2023-10-09 14:54:15 +08:00
Felix Yan 300d1bf584 chore: correct typos in DtkSettingsToolsMacros.cmake
Log:
2023-10-09 09:10:24 +08:00
Yixue Wang 4a8d71defd fix: cmake failure when env is null
When CMAKE_CXX_FLAGS_RELEASE is simply null, string will just receive
three params and this raises an error. Just quote this variable to
ensure it's a string.

Log: fix cmake failure when env is null
2023-09-26 15:14:15 +08:00
Shiroko f8cf655d95 fix: Compiling failed in libspdlog-dev before 1.4.0
spdlog::memory_but_t and spdlog::wmemory_but_t are introduced after
1.4.0.
2023-09-25 10:49:07 +08:00
ck f184e05ebd chore(tools): show help if argc < 2
show help instead of show nothing
2023-09-25 10:48:35 +08:00
ck 844a68df95 fix(build): skip failed unit test
- gsettings schema remvove from dtkcommon, Skip
- if DSYSINFO_PREFIX empty, Skip
- add_definitions ==> target_compile_definitions
- setting cache variable move to dtkcore.cmake
2023-09-19 16:56:18 +08:00
Yixue Wang 8d8bf815f4 fix: missing parameter passing for synchronization
Synchronize-to-dtk6 parameter passing has changed. Synchronize the
new usage.

Log: synchronize new form of parameter passing for synchronize-to-dtk6
Related-to: https://github.com/linuxdeepin/dtk/pull/129
2023-09-19 10:00:09 +08:00
YeShanShan ff6d5d7990 fix: Compiling failed in lower libspdlog-dev
fmt_lib introduced after v1.9.2 in spdlog.
2023-09-19 09:45:10 +08:00
YeShanShan 271edf81b1 feat: Add isDefaultValue for DConfig
Add isDefaultValue function.

Issue: https://github.com/linuxdeepin/dtk/issues/3
2023-09-15 16:55:13 +08:00
YeShanShan 9d338ebeb5 fix: Can't clear cache when reset for DConfig in FileBackend
Clear cache.
2023-09-15 16:55:13 +08:00
wangyixue f6fa26e427 chore: update changelog
Release 5.6.17.
2023-09-08 16:39:48 +08:00
wangyixue 1f419d517d fix: incorrect version passed to cmake in build
Should extract correct tag version from pkgver and then pass to cmake.
 * extract tag version and pass to cmake
 * format PKGBUILD for fewer changes in the future
 * provide a more sensible default pkgver

Log: fix incorrect version passed to cmake in archlinux build
2023-09-05 17:05:40 +08:00
deepin-ci-robot 21c6e452ed chore: update changelog
Release 5.6.16.
2023-08-22 15:13:46 +08:00
wangyixue 2a5ecfc8a5 feat: add synchronization workflow
Add synchronization workflow which will create a pull request in
linuxdeepin/dtk6core each time there is a pull request opened in
this repo. Add .syncexclude file to exclude some files that should
not be synchronized.

Log: add synchronization workflow
2023-08-18 17:41:34 +08:00
wangyixue 4c9f2c87c9 fix: missing dependency qttools5-dev
Qt5Help cmake package is provided by qttools5-dev. Dependency is
missing in debian/control.

Log: fix missing dependency qttools5-dev
2023-08-18 17:41:34 +08:00
ck 58244dd554 chore: console with color at tty
revert to c5ca3ba0
2023-08-18 13:47:08 +08:00
ck 55aaa82cf3 chore: add DtkBuildHelper depends
dtkcommon-dev >= 5.6.16
2023-08-18 13:35:54 +08:00
ck ddbb4e5f94 chore: qch docs tweak
find qhelpgenerator from CMake Target property
2023-08-18 13:33:55 +08:00
ck c6484af1c2 chore: support Qt 6.4 build
headers tweak
2023-08-17 09:48:30 +08:00
ck b9cf2a22be chore: tweak CMakeLists
- use DtkBuildHelper functions
- tests/CMakeLists.txt tweak
2023-08-16 09:28:02 +08:00
ck 4c50be9afb chore: ut linked dtkcore instead of source code
- use linked dtkcore target instead of source code
- test-revoverage.sh tweak
- setup_code_coverage && check_and_add_definitions functions(will move to dtkcommon)
2023-08-15 15:17:32 +08:00
ck 5e2b16c51f fix: FileAppender log level not set
log level not set, spdlog default is Info
fix FileAppender ut failed
2023-08-14 17:22:26 +08:00
wangyixue 276ad0d10d chore: update changelog
Release 5.6.15.
2023-08-14 11:00:48 +08:00
ck 24a29a0f9f feat: use spdlog reimplement dlog
reimplement dlog
use `DLogHelper` instead of `CuteMessageLogger` `LoggerTimingHelper`
keep CuteMessage symbol for compatibility (fix undefined symbol: _ZNK3Dtk4Core17CuteMessageLogger5writeEPKcz)
2023-08-14 09:00:43 +08:00
ck a4eba32e2b chore: dlog example tweak
dbus not used
message tweak
2023-08-10 09:50:20 +08:00
deepin-ci-robot d614c5d254 chore: update changelog
Release 5.6.14.
2023-07-27 16:17:11 +08:00
ck 0ef910387a chore: add some unit test
- DDBusInterface DNotifySender DDBusExtendedAbstractInterface
- DExpected && DError
- DSysInfo/DLicenseInfo/DSingleton ut split from ut_dutil.cpp
- DSGApplication DStandardPaths DCapManager
- DThreadUtils warnings
- DLogManager
2023-07-21 10:45:08 +08:00
ck efc5668128 chore: dsysinfo tweak
- add test file path support
- fix ensureDeepinInfo may break loop too ealy
2023-07-19 15:02:09 +08:00
ck 226add3554 chore: should include QVector headers
```use DComponentInfos = QVector<DComponentInfo*>;```
should include QVector headers or may get build error like
"invalid use of incomplete type ‘using DComponentInfos = class
 QVector<Dtk::Core::DLicenseInfo::DComponentInfo*>’
  {aka ‘class QVector<Dtk::Core::DLicenseInfo::DComponentInfo*>’}"
2023-07-18 17:12:33 +08:00
ck 43be742963 fix: internalPropSet nerver emit propertyChanged
signal should emit when reply *Not* contain an error msg
2023-07-18 17:12:33 +08:00
ck 588ada8684 feat: add systembus send support
DDBusSender::system()
2023-07-17 09:00:10 +08:00
ck 3a661dfff0 chore: add ut for DDbusSender
- tweek FakeDBusService. add method and read/write propery
- test DDbusSender. call dbus method and get/set dbus property
2023-07-11 13:30:15 +08:00
ck d0b7680edb chore: make test-recoverage.sh runable again
- set -e : exit if command has a non-zero exit status
- fix test target name ut-DtkCore
2023-07-11 13:30:15 +08:00
deepin-admin-bot 63dbfbcac3 chore: Sync by 559e91167d
sync by github workflow

Log: none
Influence: none
2023-07-10 06:12:34 +00:00
chenhongtao d4a9334349 chore(dcapmanager): RuntimeTime -> RuntimeDir
Log:
2023-07-07 06:57:17 +00:00
SPUER 8922e02148 chore: reduce compilation warnings
解决docs部分警报

Issue: https://github.com/linuxdeepin/dtk/issues/96
2023-07-07 14:11:16 +08:00
chenhongtao 8610d26c9f fix: typo in xdg
Log:
2023-07-07 05:39:26 +00:00
chenhongtao 7967167ad3 fix: updateProp cannot convert to property type
if there is a property, try to convert to the type

Log:
2023-07-06 05:11:00 +00:00
ck 868218a1db refactor!: deprecate some interfaces in dtk6
- dconfig_meta_files/dconfig_override_files remove in dtk6
- not install deprecated class headers
- remove deprecated interfaces in dtk6
2023-07-05 10:19:56 +08:00
ck d56c3629e8 chore: remove unused pro files
remove unused files
2023-07-05 10:19:56 +08:00
wangfei e10d0b4ca0 chore: change OUTPUT_DIR variable in cmake
change OUTPUT_DIR to CMAKE_CURRENT_BINARY_DIR

Log: change OUTPUT_DIR to CMAKE_CURRENT_BINARY_DIR
2023-07-04 11:35:44 +08:00
Skye-rs 4698eca093 chore: ignore doxygen-theme folder
Add new rules to .gitignore

    Log: 对/dtkcore/.gitignore文件添加忽略文件规则,避免dtk文档主题编译产物污染git目录
    Issue: dtk-issues-99
    Task: https://github.com/linuxdeepin/dtk/issues/99#issue-1785401780
2023-07-03 09:28:28 +00:00
chenhongtao 66150cdbc7 chore: function need to be marked as override
Log:
2023-06-26 02:13:10 +00:00
wangyixue b0513ab6c8 chore: update changelog
Release 5.6.13.
2023-06-25 16:38:00 +08:00
ck 7456ea4f72 chore: remove libdtkcommon depends
libdtkcore5 does not depend libdtkcommon
2023-06-25 13:09:03 +08:00
ck 8827126b47 chore: remove ddbusinterface property cache
有的服务属性改变时不会发送 ProperiesChanged 导致属性变化后再次
获取属性时还是旧的 value ,因为缓存不会更新
2023-06-19 16:34:37 +08:00
wangyixue 5e8b5d2820 fix: qdbusxml2cpp-fix not in path
Now qdbusxml2cpp-fix is not in PATH, just export it as a target so
others can use it.

Log: fix qdbusxml2cpp-fix not in path
2023-06-19 14:40:22 +08:00
heyuming beb491e781 fix: move Qt CorePrivate to target private link
Log:
2023-06-19 10:05:01 +08:00
heyuming 2df5ca70dd feat: add DThreadUtils class
Log: 添加DThreadUtils类
2023-06-16 14:15:25 +08:00
ck f5fd6cf9a8 feat: support dtk6core build
cmake -DDVERSION=6.0.0 to build libdtk6core
install qdbusxml2cpp-fix to DCore/bin to avoid conficts
do not build doc when build dtk6
remove Core5Compat depends
DVERSION ==> DTK_VERSION
tools install to CMAKE_INSTALL_LIBEXECDIR
2023-06-16 08:32:50 +08:00
renbin d74c7fbc52 fix: fix DTextEncoding warnings.
Delete never be ececuted code, use new-style cast,
avoid "disable expansion of recursive macro".

Log: fix DTextEncoding warnings.
2023-06-09 13:30:56 +00:00
renbin 475671232e fix: DTextEncoding ut failed in Qt6.
1. Fix DTextEncoding muti-byte encoding calculation error.
2. Replace QTextCodec with QStringConverter in Qt6 env.
3. Add convertTextEncodinigEx() interface.

Log: Fix DTextEncoding ut failed in Qt6.
2023-06-08 17:26:52 +08:00
ck 05d45d0eda fix: ut_dfilewater failed on Qt6
QFile::rename changed on Qt6
rename does not emit fileMoved
2023-06-07 17:14:49 +08:00
heyuming fba0d234ca fix: fix build failed due to gcc compiler bug
Log: 修复因为GCC编译器bug导致构建失败
2023-06-06 14:19:29 +08:00
ck 5d1ae206f9 fix(build): build faild on Qt6
QVariant constructor && QDBusMetaType::demarshall
2023-06-06 10:15:46 +08:00
chenhongtao 4630b5c621 fix(ut): failed ut
Log: fix failed ut
2023-06-02 10:17:31 +08:00
YeShanShan 1a16c38d77 fix: DConfig's `subpathIsValid` produces error
It's correctly even if subpath is not exist, so we can't use
`QDir::canonicalPath` to adjust subpath.
  Add ut.
2023-06-01 13:45:52 +08:00
chenhongtao db8fd1bf7b fix(dccinterface): fix cannot get the right type
Log: fix cannot get the right type
2023-05-31 07:46:03 +00:00
YeShanShan 50ff1e70fb feat: DConfig exports metadir's implementation
Export metadir's search path for users.

Issue: https://github.com/linuxdeepin/dtk/issues/10
2023-05-24 10:38:33 +08:00
YeShanShan a6969026dd feat: DConfig add check for subpath
Avoid to access unprivileged directory by DConfig's subpath.

Issue: https://github.com/linuxdeepin/dde-app-services/issues/54
2023-05-23 17:46:06 +08:00
wangyixue 0f879bdebb fix: calling delay in DDBusSender
When creating QAbstractInterface, Qt will try to invoke instrospection
into the DBus path, this is sometimes costing when instrospection
is not ready for that path. Change the implementation of DDBusSender.
Don't use QDBusInterface. Instead, create a QDBusMessage and invoke it
directly. This is sensible because DDBusSender is just a wrapper like
QDBusInterface, it shouldn't rely on QDBusInterface.

Issue: https://github.com/linuxdeepin/developer-center/issues/4415
Log: fix calling delay in DDBusSender
2023-05-23 10:27:27 +08:00
wangyixue d8c7f501a0 fix(cmake): wrong use of option and wrong macro
* BUILD_VERSION should be a string, not a boolean option;
 * Should use CMAKE_INSTALL_PREFIX as DSG_PREFIX_PATH in test,
   CMAKE_PREFIX_PATH might be a list. And there's difference between
   two variables;
 * Trim some trailing spaces.

Log: fix wrong use of option and wrong macro
2023-05-22 16:44:37 +08:00
YeShanShan f7a7a3b1fc feat: DConfig add check for no existed item when override
We shouldn't add the item when override file has no existed
item in meta items.
2023-05-17 13:38:09 +08:00
ck 03d2332e31 chore: bump version to 5.6.12
update changelog
2023-05-15 11:42:32 +08:00
YeShanShan 60c61be94a chore: Revert deleted function for DVtableHook
The functions are used in template, and they aren't inline,
so we can't delete them in this version, but we can remove
their implementation.
  It caused in fb4845350a
2023-05-15 09:10:32 +08:00
chenhongtao 386087df58 chore: back cache of caculate memoryInstalled
Log: bring back cache for caculate memoryInstalled
2023-05-10 16:08:21 +08:00
deepin-admin-bot d46820fbfa chore: Sync by 2e5e092ba3
sync by github workflow

Log: none
Influence: none
2023-05-10 02:23:53 +00:00
wangfei 5b650fb843 feat: add license infomation feature
1. add dlicenseinfo interface
2. add dlicenseinfo unit test
3. add dlicenseinfo document

Log: add license information feature
2023-05-09 16:30:56 +08:00
ck 12d337dcd0 chore: bump version to 5.6.11
update changelog
2023-05-08 15:07:11 +08:00
chenhongtao c5ca3ba029 fix: color is in file if is redirect
Log: use isatty func to check if is stderr is redirected
2023-05-05 02:58:17 +00:00
rewine c6c9aa8332 fix: must set CMAKE_INSTALL_PREFIX before GNUInstallDirs
Log: Never modify the value of CMAKE_INSTALL_PREFIX after including GNUInstallDirs, Otherwise incorrect CMAKE_INSTALL_FULL_XXXX values will be computed
2023-04-28 07:40:50 +00:00
heyuming d073f8c81e fix: incorrect DSecureString destructor
Log: 修复DSecureString的析构函数
2023-04-28 09:24:14 +08:00
heyuming fb4845350a fix: sync with qt5platform-plugins
623ce74a8c

Log: 同步qt5platform-plugins
2023-04-27 10:18:07 +08:00
guoyao 4c6390cd5b chore: remove build warning
as title

Log:
2023-04-27 08:54:19 +08:00
chenhongtao 356801bfaf feat: add color to ConsoleAppender
Log: add color to ConsoleAppender
2023-04-26 13:21:49 +08:00
YeShanShan 0cabf46e81 fix: No log file
The log file will not be generated even though we call
`registerFileAppender` when `$HOME` is empty, it is the default for
Qt, But we can fallback it to get the home directory from its user.
  e.g. for `dde-dconfig-daemon, it may be called by a specific
user with a home directory but `$HOME` unset.
2023-04-26 13:11:37 +08:00
YeShanShan 2378742c88 fix: AppId fetch error when fallback to applicationName
We shouldn't store appId fallback to applicationName.
2023-04-20 13:43:56 +08:00
Felix Yan d5c4002562 fix: adjust dependencies in PKGBUILD
- dconf is no longer used.
- This project only uses libsystemd instead of systemd.
2023-04-18 13:28:06 +08:00
YeShanShan da225ad0d3 chore: Update dconfig's example
Log:
2023-04-17 17:46:30 +08:00
YeShanShan b0a7d860f5 chore: Rename config function
TODO: Add DtkVersion's detection and warning info.

Issue: https://github.com/linuxdeepin/dtk/issues/9
2023-04-17 17:46:30 +08:00
ck ed3a3c7c19 chore: update to 5.6.10
Log: update changelog
2023-04-17 17:26:26 +08:00
deepin-admin-bot a927f81a04 chore: Sync by 2dd22560f7
sync by github workflow

Log: none
Influence: none
2023-04-14 08:41:31 +00:00
deepin-admin-bot b5599f431b chore: Sync by c5d10d3aeb
sync by github workflow

Log: none
Influence: none
2023-04-14 08:31:57 +00:00
ck 5347bebaff chore: support XDG_SESSION_DESKTOP set to DDE
环境变量设置为 DDE 时,当然是 DDE 了
2023-04-10 18:09:47 +08:00
ck 62bb12cc67 chore: update to 5.6.9
Log: update changelog
2023-04-03 10:29:30 +08:00
tsic404 2d9fc8c139 chore(CI): add OBS workflows
add OBS workflows and modify PKGBUILD support OBS build

log:
2023-03-29 09:27:56 +08:00
Ye ShanShan 3ace2e4fa7 feat: Support cache to be relocated for DConfigFile
Add setCachePrefix function to support that cache can be relocated
by caller, It's default value doesn't changed, and we can refer to
`配置文件规范` in https://github.com/linuxdeepin/deepin-specifications.
  Permissions is left to the caller.
  For DConfig's FileBackend, we use it's default value.

Issue: https://github.com/linuxdeepin/dtkcore/issues/271
2023-03-20 14:19:20 +08:00
heyuming 46dae03834 feat: append to all appenders when category is not registered
之前当程序未将category和appender关联起来时, log无法正常输出,
现添加一种fallback方式来支持此行为
相关issue:https://github.com/linuxdeepin/dtkcore/issues/292

Log: 当没有注册对应的category时输出log信息到所有的appender
2023-03-15 17:46:20 +08:00
heyuming 64731fb083 fix!: remove DCapFSFileEngine
由于在开启Relocatable的Qt上,
注册DCapFileEngine会影响到Qt内部代码产生错误的结果,
并且并没有很好的办法判断某个文件是否应该由DCapFileEngine作为后端,
所以移除

Log: 移除DCapFSFileEngine
2023-03-10 16:57:38 +08:00
heyuming 6954ff2ba9 fix: Fix incomplete copy of Vtable
1. 修复了因不完整拷贝引起的rtti信息丢失的问题
2. 对于虚表结尾判断增加了新的限制条件
3. 增加了调整虚表指针的方法,
   后续可以考虑取消对于函数指针和对象指针类型一致的限制

Log: 修复不完整的虚表拷贝
2023-03-06 13:09:36 +08:00
yyc12345 14dad1ace5 docs: fix MainPage typo
- fix typo "camke"
- fix case issue "cmake"

Log: 修复MainPage打字错误:camke。以及cmake大小写错误。
2023-03-02 18:23:55 +08:00
heyuming 2b73ff6f92 fix: fix bug of unit test under clang
Log: 修复单元测试在clang下的错误
2023-02-28 09:30:17 +08:00
Ye ShanShan a100a7637e refactor: Removing the same code for homePath
Using homePath(uid) to implement homePath().
2023-02-24 11:30:17 +08:00
heyuming 04cc067b8d fix: Temporarily fix the dead loop generated by QDebug destructor when compiling with the relocatable feature of qt
Log: 暂时修复由于qt使用relocatable特性编译时QDebug析构时产生的死循环
2023-02-23 18:21:11 +08:00
heyuming b6f349c8ec fix: fix compile error when using qt6
Log: 修复使用qt6时的编译错误
2023-02-22 15:43:09 +08:00
wangyixue 1d05dbd0fc chore: update changelog
Bump version to 5.6.8.

Log: update changelog to 5.6.8
2023-02-22 15:02:48 +08:00
ck 714de9b43f chore: specify dtkcommon-dev version
dconfig prf and cmake modules were move to dtkcore
dtkcommon-dev depends >= 5.6.4

Log: fix install conflict
2023-02-22 14:57:51 +08:00
wangyixue ce3894ea37 chore: update changlog
Release 5.6.6.

Log: update changelog to 5.6.6
2023-02-21 15:19:03 +08:00
yeshanshan 072dd9562d
feat: Add generic configuration support for DConfig (#236)
All application can use same configuration by generic
  configuration.
    Loading cache file can fallback to noappid's directory when not
using appid or not find cache file.
    one application writes configuration.
    ```c++
    auto config = DConfig::createGeneric(FileName);
    config->setValue("common-configuration", true);
    ```
    other applications read configration can give appid or not to
get the configuration.

    Set empty string for DBus caller when using acquireManager.

Log: 配置策略支持应用无关配置,缓存精准匹配到meta是否使用appid
Influence: none

Change-Id: I78b331f9c455617d5dfea6df087b1f4828390974
2023-02-16 09:41:28 +00:00
yeshanshan 56809c72e5
fix: Compiling error in qt5 (#270)
Adapt to qt5

Log: none
Influence: none
Change-Id: I71280483e12d137a7b8710c8617cea6303ad4909
2023-02-16 08:08:54 +00:00
ck edbc7c0eda chore: log file function and line by default
add QT_MESSAGELOGCONTEXT dfinetions by default
log file function line by default

Log: log
Change-Id: I119eb2ffe4ac3d372fba874b99b9fc75131c0d6e
2023-02-16 14:21:10 +08:00
ck 558a852e38 chore: private link QtCorePrivate
cmake target private link Qt::CorePrivate

Log: cmake link
2023-02-16 11:11:52 +08:00
wangyixue f33f6e2742 fix: qch generate error
qhelpgenerator run failure due to wrong markdown title tree. Change index
title level to fix.

Log: fix qch generate error
2023-02-15 16:54:36 +08:00
xiangzelong 28b9de15b8 docs: update docs
更新枚举的文档,使用新的枚举文档宏
修正文档格式

Log:
2023-02-14 13:40:45 +08:00
heyuming d1605f7da2 feat: support Qt6
Log: 支持Qt6
2023-02-14 13:22:03 +08:00
yeshanshan 9e23a65552
fix: missing BUILD_WITH_SYSTEMD macro (#258)
Define macro to be used in cpp.

Log: none
Influence: none
Change-Id: I40f743e74b5a5c5eb8e94e4ba099747d3d88523d
2023-02-07 09:50:08 +00:00
yeshanshan ac061d1c9c
fix: Lossing quotation mark for DSG_DATA_DIR macro (#259)
Add quotation mark for macro.

Log: none
Influence: none
Change-Id: Iaf26210a81e7c2e167e30b976c5e0a1ec26708b9
2023-02-07 09:49:46 +00:00
xzl a3baefca99 chore: update PKGBUILD
更新pkgbuild,添加编译选项

Log:
2023-02-07 17:05:24 +08:00
xzl d87f609504 docs: remove DConfig.doc
删除部分无用文件

Log:
2023-02-06 15:53:12 +08:00
xzl 031149fea3 docs: update readme
添加编译选项说明

Log: update readme
2023-02-06 15:43:46 +08:00
xzl 098e3975f0 fix: Removing strong dependencies on systemd
去除对systemd的强依赖

Log:
2023-02-06 15:24:41 +08:00
Ye ShanShan 33de26ff1c fix: Losing dconfig info when compiling and packaging
Add adjust for linux when compile.
  Add `D_DSG_APP_DATA_FALLBACK` macro when packaging.
  see the commit: 7b13e5c4b8

Log: none
Influence: none
Change-Id: Ie047dbd2d8158ed5242dfb5bcc7fa4e02ee1d925
2023-02-03 08:52:09 +00:00
Ye ShanShan 494b185eee fix: Cleaning path about dconfigfile
cleanPath for file path.
  cacheChanged is reset when saved avoid to resaving.

Log: none
Influence: none
Change-Id: I5bf6c2165ad19a66ad7684d696bef97c3432f0fa
2023-02-03 08:51:09 +00:00
xzl 965280ab9f docs: update log index doc
更新log index文档 更新示例

Log:
2023-02-02 16:06:20 +08:00
ck 866339a0de chore: update changelog
update changelog
Log: update changelog
Influence: none

Change-Id: I9dbe45aaa1465c30b5e3c85bf70ab0275de967c7
2023-02-02 16:02:37 +08:00
xzl 94e0e3fd86 feat: add journal appenders
support log to journal

Log:
2023-01-31 17:44:55 +08:00
wangyixue b294e425d0 docs: correct unsuitable description
Correct typo and unsuitable description.

Log: correct unsuitable description
2023-01-19 13:56:57 +08:00
ck 4cfda53c9c feat: add chinese2pinyin polyphonic support
1. update dpinyin.dict with polyphonic support
2. add pinyin and firstLetters function
3. add ch2py tools to convert Chinese to Pinyin

dict data reference https://github.com/mozillazg/pinyin-data (zdict.txt MIT)
Bug: https://pms.uniontech.com/bug-view-143063.html,https://pms.uniontech.com/bug-view-182013.html

Log: Chinese2Pinyin polyphonic support
Influence: Chinese to Pinyin
Change-Id: I5fd05c071f68908949e2b1abbbd11feed302abd4
2023-01-18 17:36:05 +08:00
heyuming c65d974733 test: fix DVtableHook and DConfig's unit testing
Log: 修复DVtableHook和DConfig的单元测试
2023-01-17 09:46:12 +08:00
xzl 486279cd7c docs: add dtrashmanager.zh_CN.dox
添加文档

Log:
2023-01-17 09:29:14 +08:00
xzl dc5beeba54 docs: update dfilewatchermanager.zh_CN.dox
更新文档,添加示例

Log:
2023-01-16 16:57:37 +08:00
xzl 245dbab5b7 feat: update file watcher manager
添加列出当前监控的文件列表的接口
添加删除全部监控的接口

Log:
2023-01-16 16:03:37 +08:00
bluesky bb2b4428df docs: update dfilesystemwatcher docs
更新dfilesystemwatcher的文档

Log: update docs

Task: deepin-community/coding-quarter#26
2023-01-16 13:19:09 +08:00
xzl 24cc0da201 docs: update docs
更新文件监控方面文档

Log:
2023-01-15 01:33:52 -06:00
xzl 6845aa32db docs: add doxygen theme
在打开build theme编译选项时会自动下载主题

Log:
2023-01-15 00:14:57 -06:00
bluesky 33713df662 docs: add example for dsettings
给dsettings添加例子

Log: add example

Task: deepin-community/coding-quarter#26
2023-01-08 23:17:29 -06:00
wangyixue 72265921b6 chore: add pie and as-needed linker flags for exe
Add -pie and -Wl,--as-needed linker flags while linking exe. Suppress
hardening-no-pie lintian warning and useless dependency warning.

Log: add linker flags and fix warning
2023-01-09 13:12:00 +08:00
wangyixue 012cf2b3d0 chore: fix lintian warnings
Fix some lintian warnings.

Log: fix lintian warnings
2023-01-09 13:12:00 +08:00
wangyixue bf7cc1a55e chore: remove useless debian/missing-sources
Remove debian/missing-sources directory.

Log: remove useless missing-sources
2023-01-09 13:12:00 +08:00
wangyixue 6769284beb chore: update changelog
Update changelog to version 5.6.4

Log: update to 5.6.4
2023-01-06 17:02:04 +08:00
wangyixue d7433df0b2 chore: add DtkDConfig package
Add DtkDConfigConfig.cmake file. Now find_package(DtkCore) can also find
DConfig support.

Log: add DtkDConfig package
2023-01-06 17:02:04 +08:00
wangyixue 191a8fb64f chore: delete useless doxygen theme
Delete useless doxygen theme, remove redundant backslash.

Log: delete useless doxygen theme
2023-01-06 13:14:36 +08:00
ck d3e83fdecf fix(build): dtkcore namespace not using
add DCORE_USE_NAMESPACE

Log: none
Influence: none
Change-Id: Ib9003d4f162732a1c17b4c7588f614b1c4d5580a
2023-01-03 17:17:41 +08:00
wangyixue b061a1b27e chore: change include and tool directory
Change include and tool directory to dtk${PROJECT_VERSION_MAJOR}.

Log: change include and tool directory
2023-01-03 17:16:40 +08:00
heyuming b2308b377e docs: add some info about DExpected and DDBusInterface
Log: 添加信息
2022-12-29 11:14:50 +08:00
deepin-admin-bot c57d13cda9 chore: Sync by d45f73b2d0
sync by github workflow

Log: none
Influence: none
2022-12-28 07:55:21 +00:00
wangyixue 9474290b2b chore: modify PKGBUILD command
Modify PKGBUILD command to use relative path.

Log: modify PKGBUILD command
2022-12-26 14:26:32 +08:00
heyuming b3053920c7 fix: remove doubleLoadCheck
不需要此检查了

Log: 移除doubleLoadCheck
2022-12-24 17:19:57 +08:00
wangyixue 5158c45dd0 chore: modify include directories policy
Change policy from PUBLIC to PRIVATE.

Log: modify include directories policy
2022-12-23 02:09:54 -06:00
wangyixue adc8a2e764 chore: remove dependency search
Remove pkg_check_modules for gsettings-qt

Log: remove dependency search
2022-12-23 14:51:02 +08:00
rewine deb1c8e37d feat: optimization logic for other distribution
优化对其他发行版的支持

Log: 优化非deepin/uos发行版支持
2022-12-23 05:38:23 +00:00
wangyixue 950aef580b feat: add support for cmake target link
Now users can simple find_package, and then target_link_libraries with
Dtk::Core. There is no need to invoke target_include_directories,
target_link_libraries will do all things for you.

Log: add cmake target link support
2022-12-23 10:22:12 +08:00
bluesky cae07609ec docs: add example for dconfigfile
给dconfigfile添加例子

Log: add example

Task: deepin-community/coding-quarter#26
2022-12-22 10:05:34 +00:00
QinBenxue 04b552a5b6 chore: Modify the wrong mark in dsysinfo.h
修改 dsysinfo.h 中错误的标记

Log:
2022-12-21 14:38:28 +08:00
ck 802f6b44b1 feat: add linglong build support
add linglong.yaml to support linglong build
see https://linglong.dev/guide/ll-builder/manifests.html

Log: linglong
Influence: linglong
Change-Id: I186edbb000b327f83ca5987dcf3d383a066eb8d5
2022-12-20 15:06:38 +08:00
bluesky b518458a27 docs: add example for dsysinfo
给dsysinfo添加例子

Log: add example

Task: deepin-community/coding-quarter#26
2022-12-20 05:24:06 +00:00
bluesky 72b285d060 docs: add example for dconfig
给dconfig添加例子

Log: add example

Task: deepin-community/coding-quarter#26
2022-12-20 11:44:57 +08:00
renbin 64bbdc979b feat: Add DTextEncoding class.
1. Add DTextEncoding class, provides encoding detection and encoding conversion.
2. Add interface unit test cases, example and comment document.
3. DTextEncoding dynamically loads libuchardet.so and libicuuc.so to support
   extended text encodings.

Log: Add DTextEncoding class.
Influence: Add build dependencies libuchardet-dev and libicu-dev.
2022-12-20 01:25:33 +00:00
bluesky 88fc2ffafc docs: add example for ddesktopentry
给ddesktopentry添加例子

Log: add example

Task: deepin-community/coding-quarter#26
2022-12-14 10:39:42 +08:00
jiangqii 5f15083361 chore: use mountpoint to find root device
from https://github.com/linuxdeepin/dtkcore/pull/40
QStorageInfo::root().device()扫描的是/etc/mtab里的内容,
但是有的根节点就只会显示/dev/root,这个会导致在控制中心
显示磁盘容量的时候不能显示,故现更改获取根挂载点的方式,
在lsblk的方法上增加。

Log:
Influence: systemDiskSize
Change-Id: I95a4955ae6d862df6c66b3d09f42b92285967ca9
2022-12-13 17:55:02 +08:00
zccrs 9279b9640e Revert "chore: Update dsysinfo.cpp"
This reverts commit 3c85297d3f.
2022-12-13 12:22:24 +08:00
ck b3e0eebf88 chore: update changelog
update changelog

Log: update changelog
Influence: none
Change-Id: Idc0cf791795d41b5881ab48a73865a2586d3f6a7
2022-12-12 17:47:24 +08:00
QinBenxue 3c85297d3f chore: Update dsysinfo.cpp
QStorageInfo::root().device()扫描的是/etc/mtab里的内容,但是有的根节点就只会显示/dev/root,这个会导致在控制中心显示磁盘容量的时候不能 显示,故现更改获取根挂载点的方式,在lsblk的方法上增加。

Log:
2022-12-12 07:37:36 +00:00
heyuming 52ecc7031e fix: fix trivially copy/move constructiable type can't be constructed
由于在C++20中引入的Concept机制和SFINAE机制完全不一样,在C++20之前无法做到相同形式的约束效果,所以放宽约束条件

Log: 修复可平凡构造类型不能被构造的错误
2022-12-12 13:52:05 +08:00
bluesky 2cd5464f08 docs: add docs for ddesktopentry
给ddesktopentry添加文档注释

Log: add docs

Task: deepin-community/coding-quarter#26
2022-12-10 23:39:38 +00:00
bluesky fb423dae3f docs: add docs for dconfigfile
给dconfigfile添加文档注释

Log: add docs

Task: deepin-community/coding-quarter#26
2022-12-08 22:50:20 +08:00
wangyixue 49e782de47 chore: label DAsync as deprecated
Label DAsync as deprecated, delete all unit tests for it.

Log: label DAsync as deprecated
2022-12-07 22:17:55 +08:00
songwentao 468f065f28 fix: qdbusxml2cpp-fix error
修复使用命令生成代码文件,编译报错问题

Log:
2022-12-07 08:08:32 +00:00
QinBenxue 3f394aee0e fix: qch does not generate the problem
修复qch不生成的问题

Log:
2022-12-06 20:37:45 +08:00
ck 391dd999bd chore: link to real source file when export
link to the real source instead of path in dci file

Log: fix invalid link
Influence: none
Change-Id: I10be7efc5d2e5bb14e0ffeb0198c4ee8ab3f230b
2022-12-06 17:22:59 +08:00
ck b3fd390fa0 chore: add command tree and install dci tool
useage ./dci --tree /path/to/dcifile.dci
install dci in libdtkcore5-bin

Log: none
Influcen: none
Change-Id: I1123d533d367c5b91c735dd0fc581f9896b1e557
2022-12-06 17:22:59 +08:00
xzl 1a1afdb54c docs: update docs
添加示例,修复部分问题

Log:
Task: https://pms.uniontech.com/task-view-216407.html
2022-12-06 11:18:43 +08:00
xzl ced97dfc5f docs: update MainPage
更新文档

Log:
Task: https://pms.uniontech.com/task-view-216407.html
2022-12-06 09:52:21 +08:00
xzl 3d00aecbf3 docs: update docs
更新目录结构, 添加部分文档

Log:
Task: https://pms.uniontech.com/task-view-216407.html
2022-12-05 02:14:48 -06:00
wangyixue 2a9edc17dd chore: fix linking error
DtkCoreConfig.cmake will always find the library under system library
path. This will cause a linking error when you want to use the version
deployed by yourself. Fix that by appending the path prefix.

Log: fix DtkConfig.cmake.in
Influence: DtkConfig.cmake.in
2022-12-05 10:38:03 +08:00
bluesky f53f9f3c43 docs: add docs for settings
给qsettingbackend添加文档注释

Log: add docs

Task: deepin-community/coding-quarter#26
2022-12-04 03:01:44 -06:00
bluesky 2f267c0eda docs: add docs for settings
给gsettingsbackend添加文档注释

Log: add docs

Task: deepin-community/coding-quarter#26
2022-12-03 22:16:52 -06:00
bluesky 1785a16d98 docs: add docs for settings
给dsettingsdconfigbackend添加文档注释

Log: add docs

Task: deepin-community/coding-quarter#26
2022-12-02 23:23:34 -06:00
bluesky 3234c94829 docs: add docs for settings
给dsettingsoption添加文档注释

Log: add docs

Task: https://github.com/deepin-community/coding-quarter/issues/26
2022-12-02 09:03:59 +00:00
xzl 3e43d58744 docs: update documents
更新文档,符合规范

Log:
Task: https://pms.uniontech.com/task-view-216407.html
2022-12-02 01:47:00 -06:00
bluesky f4252ebf58 docs: add docs for settings
给dsettingsgroup添加文档注释

Log: add docs

Task: https://github.com/deepin-community/coding-quarter/issues/26
2022-12-02 04:48:54 +00:00
Astrea cb5b7f15ea docs: add docs for formatters
Add docs for DDiskSizeFormatter and DTimeUnitFormatter.

Log: add docs for formatters
2022-12-01 21:21:29 +08:00
Astrea 3c731e9145 docs: add docs for ddbussender.h
Add docs for DDBusSender, DDBusData, DDBusCaller, DDBusProperty.

Log: add docs for ddbussender.h
2022-12-01 21:13:39 +08:00
xzl 40849b1825 fix: fix README.md
修复README.md

Log:
2022-12-01 19:51:38 +08:00
xzl 93b4f5109b docs: update README.md
为README.md添加文档链接

Log:
2022-12-01 02:14:06 -06:00
xzl ea11f9623d chore: add ISSUE_TEMPLATE
添加issue模板

Log:
2022-12-01 14:30:23 +08:00
bluesky 56346c334b docs: add docs for settings
给dsettings添加文档注释

Log: add docs

Task: https://github.com/deepin-community/coding-quarter/issues/26
2022-12-01 05:31:11 +00:00
Astrea 724696bdf6 chore: format code
Add .clang-format. Format code that has been modified by commit
e6423c5.

Log: format code
Influence: e6423c5
2022-11-30 02:24:08 -06:00
Astrea c3b81cb348 docs: add docs for util
Add docs for DDBusExtendedAbstractInterface.

Log: add docs
Influence: None
2022-11-30 02:24:08 -06:00
Astrea 7e35e14558 chore!: move namespace
Move DDBusExtendedAbstractInterface and DDBusExtendedPendingCallWatcher
to Dtk::Core.

Log: move namespace
Influence: DDBusAbstractInterface, DDBusExtendedPendingCallWatcher
2022-11-30 02:24:08 -06:00
Astrea 9b9c84690d fix: delete an undefined overloaded function
Delete an undefined overloader constructor of DDBusInterface.

Log: delete an constructor
Influence: DDBusInterface
2022-11-30 02:23:14 -06:00
bluesky e4c3c14553 fix: fix dconfig docs
dconfig的详细描述添加@details

Log:
2022-11-30 04:34:22 +00:00
Ye ShanShan b6ff48d01a fix: Remove ASan check for debug
Removing asan check

Log: 移除库的asan检测
Influence: none
Change-Id: I05ba51f5a0111f86c0231dc72e343b37703ec30d
2022-11-29 20:33:14 +08:00
xzl a148240c08 docs: update dcapfile document
更新文件模块文档

Log: 更新文档
Task: https://pms.uniontech.com/task-view-216407.html
2022-11-28 13:28:27 +08:00
bluesky 1962f0c33c fix: fix ddcifile docs
修正@retval注解

Log:
2022-11-27 21:02:31 +08:00
bluesky 7b4558f3fe fix: fix ddcifile docs
修改@param注解

Log:
2022-11-27 19:28:34 +08:00
bluesky a0e660c71d docs: add dconfig docs
添加dconfig文档注释

 Log:
2022-11-26 02:41:23 -06:00
Astrea a42cf2255d docs: update docs for util
Update docs for dabstractunitformatter.h.

Log: update docs
Influence: none
2022-11-25 04:48:11 -06:00
ck 20326640cc fix: missing implementation and obsolete Member
add missing imple of rollingfileappender
use Use QFile::symLinkTarget() instead of QFile::readLink()

Log: none
Influence: none
Change-Id: I7cf642fed010bcb73f1c3ebca0c2bfd3a6795dad
2022-11-25 17:25:53 +08:00
xzl ebba3ae365 docs: update filesystem documents
更新filesystem文档

Log:
2022-11-24 04:07:22 -06:00
deepin-admin-bot de6348c30b chore: Sync by 3de30af6dc
sync by github workflow

Log: none
Influence: none
2022-11-24 08:45:35 +00:00
xzl 49b566c4a3 docs: update dlog documents
更新dlog文档

Log:
2022-11-24 01:01:23 -06:00
xzl fa81207750 docs: update Logger documents
更新logger的文档

Log:
2022-11-23 20:09:01 -06:00
xzl 39f7385688 docs: Standardize documents, add groups
规范文档,添加分组

Log:
2022-11-22 02:55:51 -06:00
wang fei c2f03ad13c chore: 完善cpu信息获取接口(cpuModelName)
分别按以下顺序取其值,取到就返回:
1. 首先匹配sw,hw-klv里的特殊字段;
2. 然后取model name字段;
3. 最后通过lscpu命令获取;

Log: 修改cpu信息获取接口
Task: https://pms.uniontech.com/task-view-218217.html
Influence: cpuModelName接口
Change-Id: I6ba1a66f1d898725ebcb9a59791f6d466149a3a3
2022-11-22 08:10:53 +00:00
xzl ec7efcf4a0 docs: update docs dlog modules
更新dlog模块的文档

Log:
2022-11-22 01:06:48 -06:00
xzl cd06007fc4 docs: update docs
更新DLogManager文档,修改代码中的文档

Log:
2022-11-21 02:29:42 -06:00
xzl 78e7260a3e chore: update references doc
更新文档所需参考文档(临时参考性质)

Log:
2022-11-20 23:22:21 -06:00
xzl ee2012ac3e docs: add dcifile docs
添加dci文件文件注释文档

Log:
2022-11-20 21:09:27 -06:00
chenhongtao d4f8a00af7 chore: fix license
Log: fix license in win32/OutputDebugAppender.h
2022-11-20 20:41:17 -06:00
deepin-admin-bot 5cd8571028 chore: Sync by 6aa579e31c
sync by github workflow

Log: none
Influence: none
2022-11-18 02:00:26 +00:00
ck a4c2b8dfb4 chore: update changelog
update changelog

Log: update changelog
Influence: none
Change-Id: Ifb565f0e4bd5ba89197a169ba405c46fdab49180
2022-11-17 03:59:08 -06:00
ck 8d29493870 fix: Logger constructor crash
LoggerPrivate not init..

Log: 修复帮助手册在升级dtkcore后无法打开的问题
Bug: https://pms.uniontech.com/bug-view-172121.html
Change-Id: Ieee74154a33260043af264a176dabc672a17f559
2022-11-17 03:30:14 -06:00
xzl f34e935321 docs: fix some error in doxygen docs.
修复部分文档错误

Log:
2022-11-16 20:26:27 -06:00
xzl 9ef2debe27 docs: add doxygen theme
添加doxygen主题

Log:
2022-11-16 02:42:22 -06:00
xzl ad3a47a6aa docs: update doxygen docs
更新doxygen文档
TODO: 清理已经添加文档代码中中文注释

Log:
2022-11-16 02:17:15 -06:00
deepin-admin-bot 7caa3f79ed chore: Sync by 50ad27fb2a
sync by github workflow

Log: none
Influence: none
2022-11-16 03:44:15 +00:00
xzl 93dbaf9feb docs: add doxygen docs
添加doxgen文档

Log:
2022-11-15 03:28:36 -06:00
deepin-admin-bot e3fa8c33dd chore: Sync by d15debb9d3
sync by github workflow

Log: none
Influence: none
2022-11-11 06:54:21 +00:00
ck 3a65c261d1 fix: missing sw_64 architecture
fix sw_64 build failed

Log: none
Change-Id: I0f0b997eeab1452155b0c4d0da11454e1df1de4e
2022-11-10 15:20:52 +08:00
heyuming a578bc1a5d improvement: remove unnecessary variant member
不需要保留此变量,因为所有构造函数总会初始化value和error其中之一

Log:移除不必要的成员
2022-11-03 14:53:37 +08:00
wangyixue 27f6160b64 chore: update changelog
Update changelog.

Log: update changelog
2022-10-31 17:31:55 +08:00
范朋程 554d22da1a feat: add ddbusextendedabstractinterface
通过此类可以很方便得实现异步dbus通信
修改tools生成信息中的类名

Log: add ddbusextendedabstractinterface
Change-Id: Ida45d0d22d065af3d86c7ad062419183572291dc
feat: add ddbusextendedabstractinterface

通过此类可以很方便得实现异步dbus通信

Log: add ddbusextendedabstractinterface
Change-Id: Ida45d0d22d065af3d86c7ad062419183572291dc
2022-10-31 15:20:34 +08:00
heyuming dbe1403e19 fix: fix missing std::move for rvalue reference qualified function value
Log: 修复右值引用限定函数value缺少std::move
2022-10-31 02:46:12 +00:00
heyuming 66b5a05b97 fix: fix logic error of DExpected<void> partial specialization's destractor
Log:修复DExpected<void>偏特化的析构错误
2022-10-31 02:46:12 +00:00
heyuming 6ff0c5a9b6 refactor: correct function name has_value to hasValue
Log: 更改has_value为hasValue
2022-10-29 10:15:06 +08:00
heyuming 70208feb66 feat: add DError as default template parameter to DUnexpected
Log: 添加DError为DUnexpected的默认模板参数
2022-10-28 14:44:22 +08:00
heyuming 60f4f0dfb0 fix: fix likely/unlikely type convertion error
Log: 修复likely/unlikely的类型转换引起的编译错误
2022-10-28 14:44:22 +08:00
heyuming 75ad55a9b8 fix: fix reinit imcomplete instantiation
修复reinit函数因类型约束不完整导致的编译错误

Log: 修复reinit函数的不完整实例化
2022-10-28 14:44:22 +08:00
chenhongtao 7aa6f4725d fix: missingdefinition
the first time turn to cmake, the definition is missing

Log: return the missingdefinition
2022-10-27 05:40:29 +00:00
heyuming 7465548579 feat: add default template parameter to type E
Log: 为错误类型添加默认模板参数
2022-10-27 03:46:54 +00:00
Ye ShanShan 8cea334b09 fix: DDbusInterface Can't route complex dbus type
QVariant's typeName is not work for complex dbus data type,
(e.g: QList<QDBusObjectPath>), and it causes QMetaObject'indexOfSignal
return -1.
  We add a special action for DBusArgument Type,
  Add type cast to get typeName and demarshall to get data.

Log: 解决DDbusInterface不能转发复杂DBus类型的信号问题
Influence: none
Change-Id: I1e90f96af384393065ed554daf6a3bb46d32bc39
2022-10-26 13:28:27 +00:00
ck 5c48bd4c84 feat: add sysinfo interface
bootTime; shutdownTime; uptime; arch

Log:
Change-Id: I460a517a6bdb6a980ebf8a6956c1dc8041274985
2022-10-26 18:10:08 +08:00
heyuming a32e231fd4 chore: add CMake rules for installing dexpected.h
以及derror.h

Log: 添加dexpected.h的CMake安装规则
2022-10-24 02:36:46 +00:00
chenhongtao 1b0ec70e0c doc: update README
README to LGPL-3.0-or-later

Log: fix licence
2022-10-21 14:44:40 +08:00
ck 1b07dacb79 feat: update Log license
1. 本次修改为了保证接口兼容头文件部分
的接口定义基本没有变动,包括文件名也是不变的。
但是实现部分做了一些调整,在原有实现的基础上做了
一些改进,包括不限于编码风格和部分定制化的修改。
2. 删除log目录下的无用 LICENSE 文件
3. 更新根目录下的 LICENSE 文件,LGPL-3.0-or-later

Log: none
Change-Id: I23e12fc3cff2ba1221586aa70fcb898bd4f15225
2022-10-21 14:21:47 +08:00
heyuming 01fc362af0 chore: change Dexpected to DExpected
Derror和Dunexpected同理

Log: Dexpected改名为DExpected
2022-10-20 15:26:21 +08:00
heyuming d7cd2fd226 docs: add docs for Derror and Dexpected class
Log: 加入Derror和Dexpected的文档
2022-10-20 14:35:42 +08:00
heyuming ae532db64d feat: add Derror class
Log:加入Derror错误类
2022-10-20 14:35:42 +08:00
heyuming 68952c80d0 feat: add Dexpected class
Dexpected作为错误处理模板类,Dunexpected作为辅助类

Log:加入Dexpected类
2022-10-20 14:35:42 +08:00
deepin-admin-bot 9371813c93 chore: Sync by 6fbf8e00b9
sync by github workflow

Log: none
Influence: none
2022-10-14 05:24:48 +00:00
rewine 8ce7d3e3c7 feat: Optimize compilation parameters
Log: Optimize compilation parameters
2022-10-09 07:21:28 +00:00
guoyao 1b4b0c229a fix(DDBusInterface): can not emit property changed signal
can not emit property changed signal

Log:
2022-09-29 09:04:34 +08:00
rewine 563a954d9c feat: set DtkCore_LIBRARY_DIRS
Log: set DtkCore_LIBRARY_DIRS
2022-09-28 01:06:58 +00:00
liuheng 42bd299eb2 chore: update changelog
update changelog

Log:
2022-09-21 14:34:00 +08:00
ck f1c10cbbff chore: 微调 ddbusinterface 类
1. 去除编译警告,用 static 修饰变量
2. 空指针检测
3. 加上dtkcore 的 namespace

Log: none
Influence: none
Change-Id: Ibf8b72a01f4450f0fdac54a2f6f7040535dd75ee
2022-09-21 13:21:07 +08:00
rewine 17c429611f chore: use SameMajorVersion in version file
Log: dtk 5 与 dtk 6 不保证兼容,使用 SameMajorVersion 更好
2022-09-20 09:04:21 +00:00
heyuming 24313e806b feat: add ddbusinterface
增加ddbusinterface2并且修改相关cmake文件

Log:增加ddbusinterface类
2022-09-14 10:32:28 +08:00
rewine 363b612ef7 chore(tools): remove deprecated script
Log: remove deprecated script
2022-09-08 16:01:54 +08:00
rewine e3f7f6bbd9 fix: don't check DtkCore_TOOL_DIR cause split pkgs
Log: deepin 中,tool 会被分到和 dev 不同的包,因此 dev 提供的 config.cmake  不应该检查
DtkCore_TOOL_DIR 是否存在
2022-09-08 14:38:00 +08:00
rewine 40324bf909 fix: use FULL install path
Log: 安装路径使用绝对路径, INCLUDE_INSTALL_DIR 会传给 .pc 文件
2022-09-08 01:53:37 +00:00
rewine 5321d477ad feat: use CMakePackageConfigHelpers to generate better config.cmake
1. 对 CMAKE_INSTALL_PREFIX 默认值修改移动到根目录 CMakeLists.txt
2. 增加 INCLUDE_INSTALL_DIR TOOL_INSTALL_DIR 变量化简写法
3. 使用专门处理 config.cmake 的 configure_package_config_file 函数代替 configure_file
4. 使用 write_basic_package_version_file 生成 cmake 用的版本文件
5. 补充 pkg-config 的 -L 参数
6. 使用更普适的方法配置 pkg-config 内路径
2022-09-07 10:01:28 +00:00
rewine 513d12a0c1 chore(mkspecs): define mkspecs self
Log: mkspecs path
2022-09-06 06:37:03 +00:00
rewine 7b5422934f chore: use DSG_PREFIX_PATH set PREFIX
Log: use DSG_PREFIX_PATH set PREFIX
2022-09-06 06:37:03 +00:00
chenhongtao 068a6d9688 fix(shell): wrong target
A mistake, since the target name changed, the target name in shell
should also change

Log: fix recoveryshell
2022-09-06 06:16:31 +00:00
Chen Bin e221e232fc fix: Build failed using clang
const 类成员函数下的成员变量默认会添加 const 属性,
而 QMutexLocker 的参数需要接收一个非 const 的变量,
出现编译错误。这种情况下,需要将成员变量修改为
mutable。

Log:
Change-Id: I573b3a258a837037717b9d646977886dba45c5d8
2022-09-01 11:07:49 +08:00
Wang Zichong 71bb1cd1dd fix: wrong option() usage in CMakeLists.txt
修复错误的 option() 用法

Log:
2022-09-01 02:50:10 +00:00
Ye ShanShan f1c4f76f1a chore: Modify some nonstandard writing
Change Warning log to Debug.
  Rename GlobalUID to InvalidUID avoiding to misunderstand.
  cache saved only it's setValue has been called.

Log: 移除错误的输出警告,当cache被修改后才保存
Influence: 如果没有设置值,再不会生成缓存文件
Change-Id: I1f71513e91bef3412f593281e68fea44801fe07b
2022-08-31 03:51:37 +00:00
Ye ShanShan 9bdb33a201 fix: DConfig can't load meta file
PREFIX's value is error when qmake to cmake, and it causes
dde-dconfig-daemon can't load meta file.

Log: PREFIX未赋值,导致查找配置文件路径错误
Influence: 配置中心服务异常,不能正确加载配置信息
Change-Id: Ib0850d40ff62ebf6673bd410afa3f9587a2b3413
2022-08-31 11:47:12 +08:00
myml a58c432421 fix: README link
fix 'Application Specification' link url
2022-08-31 11:16:57 +08:00
deepin-admin-bot 22a7a7c9b6 "chore: Sync by " 2022-08-30 09:11:22 +00:00
chenhongtao 552c42794e chore(package): unit test, coverage
use better optionname and use test , make test link to -lgcov , then
coverage can be caculated. And use ctest , the cmake command to run
tests

fix test-recoverage bash scipts

Log: option name changed , use ctest command, fix test-recoverage script
2022-08-30 08:14:36 +00:00
chenhongtao d0c66b03a6 feat(doc): add package for doc
build the package for doc

Log: build package of doc
2022-08-29 09:33:59 +08:00
Chen Bin 9cdc9e7741 feat: add the permission management for files
Use DCapManager class to unify privilege management on
whether to open files or not.

By registering a special file engine, the scope of action
after registration is global unless called the unregister
function manually.

By default, the application can still access some directories
and files with permissions after it is started, but when it
access files beyond the scope of these directories, it will
not get any information.

The default directory includes: Home path; Cache path; DSG path
XDG path etc.

Log:
Influence: null
Change-Id: I0fed6051addc56001b382fc34f73b046c0e4aca2
2022-08-26 11:45:17 +08:00
Ye ShanShan 066f34ede8 chore: Add zh_CN readme
add README.zh_CN.md

Log: 添加中文说明文档
Influence: none
Change-Id: Ic45a17adbfd068b3036aae83524791fc7f602b81
2022-08-26 10:13:23 +08:00
Wang Zichong a4ee7c1275 fix: missing include folder while generating documentation
添加项目转换为 CMake 后生成文档缺少的 include 目录

Log:
2022-08-25 13:30:56 +08:00
xzl 1750f9811b chore: update REUSE license header
更新开源合规内容

Log: 更新开源合规内容
2022-08-19 13:05:01 +08:00
Felix Yan 5109a018ab chore: fix a typo in dfilewatcher.cpp
Correct a typo.

Log: Fix a typo in dfilewatcher.cpp
2022-08-19 10:29:21 +08:00
ShootingStarDragons c2ab630d91 chore(win32): Add win32 files and delete pri files
Delete all pri files and add win32 files back to CMakeLists.txt

Log: add win32 file back to CMakeLists.txt
2022-08-17 06:06:02 +00:00
ck 165921354d fix(build): invalid digit "8" in octal constant
when BUILD_VERSION start with 0 was recognized as octal

Log:
Influence: debian build
Change-Id: I0d9cb1518b4250b5f50408651d8fab66f469bebb
2022-08-17 13:03:59 +08:00
deepin-bot[bot] c19f743895
chore: Sync by 8fb17418f4 (#89)
chore: Sync by 8fb17418f4
2022-08-16 09:33:47 +00:00
ShootingStarDragons db5ae947fe feat(tocmake): tocmake
Change the build system to cmake

Log: use cmake
2022-08-16 07:50:54 +00:00
deepin-bot[bot] b2de0dd2e2
chore: Sync by ab82576125 (#87)
chore: Sync by ab82576125
2022-08-16 00:14:15 +00:00
Hillwood Yang a0817dffb4 fix: link to dl
It should link to dl for some distrbutions. For example, openSUSE.
The compiling won't be success without this link.

Log:
2022-08-15 14:55:00 +08:00
deepin-bot[bot] c859224ee7
chore: Sync by (#86)
chore: Sync by
2022-08-15 03:03:51 +00:00
deepin-bot[bot] c0d423e8d1
chore: Sync by 1086c873ff (#85)
chore: Sync by 1086c873ff
2022-08-12 02:05:52 +00:00
deepin-bot[bot] 8f422c4d4f
chore: Sync by 8cd7951872 (#84)
chore: Sync by 8cd7951872
2022-08-11 08:52:07 +00:00
guoyao c6629ebb55 chore: adapt REUSE license header
开源合规

Log: 开源合规
2022-08-11 14:02:36 +08:00
zccrs 7b13e5c4b8 fix: fallback to the user directory if no a valid global config directory
In the not supported for DSG_APP_DATA environment, we can't get a valid
directory for the global config, then falied when saving data. In order
not to lose data, we can only fallback to storing it to the user
directory.

Also, allows to specify a fallback directory for DSG_APP_DATA on
compile, in order to never fallback to the user directory.

Log:
2022-08-04 14:30:03 +08:00
deepin-bot[bot] a597abb745
chore: Sync by fed570b6d7 (#77)
chore: Sync by fed570b6d7
2022-07-26 05:45:45 +00:00
deepin-bot[bot] 28215712ce
chore: Sync by (#76)
chore: Sync by
2022-07-21 10:02:26 +00:00
zccrs 9b9b96427a
fix: remove not supported syntax for README (#75)
Log:
2022-07-21 17:51:54 +08:00
deepin-bot[bot] 381fa7ca74
chore: Sync by (#73)
chore: Sync by
2022-07-19 09:10:25 +00:00
rewine 702a43dd09
feat: add NixOS for DSysInfo (#62)
Log: add NixOS for DSysInfo
2022-07-19 09:32:23 +08:00
Han Gao 6c2377c6da
feat: add Gentoo for DSysInfo (#63)
add gentoo define to DSysInfo

Signed-off-by: Han Gao <gaohan@deepin.org>
Co-authored-by: Han Gao <gaohan@deepin.org>
2022-07-18 17:18:11 +08:00
zccrs a650c2c452
Merge pull request #72 from kegechen/master
Merge develop/snipe to master
2022-07-18 16:18:14 +08:00
ck 6008c019ff feat: Merge branch 'develop/snipe'
merge develop/snipe

Log:
Influence: none
Change-Id: I0e035f79a4a84039cb1ff865fed907951e468a9b
2022-07-18 15:46:07 +08:00
ck cf02db4073 chore: update changelog
update changelog

Log: update changelog
Influence: none
Change-Id: I3f3a49bcc5d864c73f23246ba8bc612b097a092e
2022-07-12 17:46:48 +08:00
Chen Bin 40d737ebcf fix: Optimize the use of DCI tools
1. Add a comment to introduce a real example of the tool.
2. Fix possible fileName acquisition failures in export scenarios

Log:
Influence: None
Change-Id: I752d8d3548793af35b25f748d0f255a86dc32c8f
2022-07-12 15:09:47 +08:00
Ye ShanShan c313f308ea fix: AppId gets error
AppId gets error when DTK_DISABLED_FALLBACK_APPID is set.

Log: 获取AppId时fallback错误
Influence: none
Change-Id: I27007980d0c95cdfce30b40fcb27a5f64e5eac08
2022-07-12 13:25:24 +08:00
ck 4fb186d57d chore: update changelog
update changelog

Log: update changelog
Influence: none
Change-Id: I5cfdaa9ff1cc153ee061bfdd1a0edf79d991ef10
2022-07-08 15:14:10 +08:00
wang fei 5969c48719 feat: 加载dconfigfile时,添加value字段的检测
加载meta和override时,检测配置项是否有value字段

Log: 加载配置文件时,检测配置项是否有value字段
Influence: 配置策略
Change-Id: I9fe2f54fa76870139a6929dc46ce610de465abc8
2022-06-28 21:15:41 +08:00
wang fei ed31144e74 chore: 更新changelog
develop/snipe 分支更新changelog 到 5.6.0.1

Log:
Influence: changelog
Change-Id: Id1f379f729100b3fab23326bd2575dcb00a8ff56
2022-06-14 10:39:09 +08:00
Ye ShanShan 1ce2bd0835 fix: DConfig'appId assertion failed
Use DConfigPrivate's appId as far as possible,
Remove invalid code, it maybe crash when applicationName is empty.

Log:
Influence: 部分使用场景可能出现applicationName为空,导致断言发生,例如全局变量
初始化DConfig时(在QCoreApplication初始化之前被调用)。

Change-Id: Ic732be96c6821aefc64622ba86e1817f238a028d
2022-06-07 15:41:48 +08:00
ck f9db0fbb69 chore: fix build warning
Q_UNUSED(qq)

Log:
Influence: none
Change-Id: I5808eeb4a1aa844ad78c12da20b5f4f8fe54df65
2022-05-16 21:12:40 +08:00
Ye ShanShan e8d6130c31 fix: DConfig can't find resource
dde-config-daemon loads resouce from `$$PREFIX/share/dsg` when default
action, and `PREFIX`'s value is empty.
set default value for PREFIX from QT_INSTALL_PREFIX(/usr).

Log: 
Influence: 开发dtkcore,但没有指定PREFIX值,导致配置策略加载失败
Change-Id: I97573c283365aa581d5e93eb75d27259134f10af
2022-05-10 20:38:45 +08:00
Ye ShanShan a54b317ca5 fix: application crash when dconfig is invalid
Add invalid check for all DConfig's method(avoid null pointer dereference).
fallback to FileBackend when DBusBackend can't be created.

set correct environment value in unit test.

Log:
Influence: all application crash when dconfig is invalid but still
call other method expect isValid.

Change-Id: I7395f44518989cb14a09306fcfd4db380608a24e
2022-05-10 20:38:39 +08:00
Ye ShanShan 91447e5d39 fix: DSetting unit error and crash randomly
DSettingsBackend::doSetOption is executing when `DSettings` has
been destroyed, because `doSetOption` is connected in `QueuedConnection`
way, this would be ensure `backendWriteThread`'seventloop is exited
when `DSetting` destoryed.

we ensure `DSettings` is released before `SettingBackend`, so that
`SettingBackend`'s slot would be executed when `DSetting` destoryed.

we also should ensure `SettinBackend` is thread safely, because os
`DSettings` has backendWriteThread to execute doSetOption, and getOption,
is execute in main thread.

remove link of libdtkcore in qmake, because we compile it's source code
in unit test.

Log:
Influence: none
Change-Id: I35fcb8dff2145aec74255889dbd84b5a0525bffb
2022-05-10 20:37:52 +08:00
Ye ShanShan 305f97a724 fix: dconfig can't support embed complex data type
using recursion to parse QDBusArgument.

Log: 
Influence: none
Change-Id: I483721fb761eae1e735aa36fd38fe93cbd2d1529
2022-05-10 20:29:18 +08:00
Ye ShanShan 3d8c5c1b9d chore: unit error in loongarch64
QSettingsBackend unit is error in loongarch64

Log: 
Influence: none
Change-Id: I364ed6a9601688a7348c12bb740bf964a5f1ab98
2022-04-11 16:53:06 +08:00
Ye ShanShan 044955459a chore: unit error in loongarch64
QSettingsBackend unit is error in loongarch64

Log: 
Influence: none
Change-Id: Ibd656196db2e3f9d73642943b4eb79c3d477084f
2022-04-11 16:53:06 +08:00
Ye ShanShan 4d0cb3fc1b fix: modify loading order of application meta path
for application meta path loads order change from
/usr/share/dsg/apps/${appid}/confgis to
/usr/share/dsg/configs/${appid} or /usr/share/dsg/configs;
replace DStandardPaths::paths to DStandardPaths::path.
modify saved path。

Log:
Influence: all application's configuration would not be loaded
unless updating dtkcommon and it's application package.

Change-Id: Ia8212618fd2d4a5ecf67f05aad32a92d934ea01d
2022-04-11 16:53:06 +08:00
ck 7389c83b78 chore: remove assert in ensureOsVersion
use if condition instead of assert
setStatus No_ERROR when loadfile success

Log:
Influence: none
Change-Id: Id13c9c418054890e41e51dae9367261844fe9ed6
2022-04-11 16:48:54 +08:00
Ye ShanShan 72cc33ec0a feat: Add interface for Dconfig
add reset function;
add Dconfig construct containing appId, to keep compatible,we use
a static function to avoid ambiguous, construct function calls
no appid's. it is useful to access other application's configure
timely in DBusBackend.

Log:
Influence: user can access other application's configure and
reset value for the key.

Change-Id: Id707a96ba1216b406b5c6f724ba5d715cfb053db
2022-04-11 16:48:54 +08:00
ck bcdb09c189 chore: 修改单元测试生成目录
修改单元测试相关文件的目录结构

Log:
Influence: 单元测试目录结构
Change-Id: Ife2dabc8763fd6689c7b5c5fadbc40152217e116
2022-04-11 16:47:38 +08:00
Ye ShanShan 423d530965 feat: add data type check for config
Check value's type of incoming is compatible,
it copies a value and converts to meta type, it promises
that setValue function is not changing meta type.

Log:
Influence: calling DConfig's setValue maybe fail because of type
incompatible.

Change-Id: I35bef57261a3130ebcb4aeeff83261737ad51197
2022-04-11 16:47:38 +08:00
Ye ShanShan 3c80a88052 fix: Can't access QStringList type data for DConfig
it's occur in DBusBackend, and we directly to get meta value that not
exist cache.
normal value type is automatic casted from QDBusVariant to QVariant,
and QVariantList type need to cast explicitly, it's value type is
QDBusArgument.
because our data store backend is using QJsonValue to resolve, so
we only case QVariantList and QVariantMap, it maybe error in lastly.

Log: 
Influence: DConfig is not access stringlist data type.
Change-Id: I81dbc2ea6b7933154d26ddba70def95ef79240d6
2022-04-11 16:47:38 +08:00
Ye ShanShan 490670f596 fix: unit error
inotify_init1 failed in DFileSystemWatcher, it reports Too many
open files, and now we avoid to CHECK temporarily in ut.

Log: 
Influence: none
Change-Id: I42d508b1ad63dfb4dda8328a41bcbfc530082e97
2022-04-11 16:47:38 +08:00
ck 6cb7ec8f70 chore: 主动拉起未启动的 dconfig 服务
如果服务是 Activatable 状态那么直接调用可以启动服务
之前的逻辑是dbus服务必须是启动状态,不会自动拉起来,
可能会出现没有权限写cache

Log: 主动拉起dconfig服务
Influence: dconfig--save--permission
Change-Id: I32eb4606854f568b8754bf765802453dfdb8b15a
2022-04-11 16:44:49 +08:00
Chen Bin d8b924ae25 docs: fix doc generate error
Fix the problem of document generation errors caused by
some symbols and commands.

Log:
Influence: dtkcore docs
Change-Id: I081c12a3bc98c89925e27aa7c2e1aeb0e228c255
2022-04-11 16:44:49 +08:00
ck 5ae0099c78 fix(build): can not find QGSettings
archlinux build failed, include path may have changed

Log:
Influence: none
Change-Id: I75d7aba1fb96a5a48fb819faf087ff1a0c7d9a0c
2022-04-11 16:44:49 +08:00
ck 6071352b6f feat: osversion中OEM标识兼容
根据需求识别os-version中的OEM标识,放置出现非数字时其它未解析。

Task: https://pms.uniontech.com/zentao/task-view-95660.html
Log:
Influence: oem镜像
Change-Id: I4d2e5f71f683131553053928bc7f53115126c73c
2022-04-11 16:44:49 +08:00
yuanqiliang 418498ca03 fix: 修复dtk单例模板缺陷
析构函数设置为虚函数、返回引用

Log:

Influence: 所有用到dtkcore单例模板的地方

Change-Id: I0d1dec61679ff9d86547e6895aafdaf2fcf69115
2022-04-11 16:44:49 +08:00
Ye ShanShan 6ae34243fb fix: change directory of cache for dconfig
change globalcache direcotry
from '/deepin/appdata' to '/var/dsg/appdata'.
it saves failed when user has no home directory.

Bug: https://pms.uniontech.com/zentao/bug-view-105077.html
Log:
Influence: It effects all application used dconfig.

Change-Id: If7a0e67c762f58701bf58a228e84e8c2525a897f
2022-04-11 16:44:49 +08:00
zorowk 3891b1bdae fix: ut link error in dtk.
the member definition need to be separate in some build environment.

Log:
Influence: build error.
Signed-off-by: zorowk <pengwenhao@uniontech.com>
Change-Id: Idd982f0e0a17efa50e170c4590c83ea75abaa031
2022-04-11 16:32:43 +08:00
Wang Fei 12e5b42bed feat: DSettings适配兼容DConfig
增加DSettingsDConfigbackend类,
DSetting可以使用DConfig方式配置

Log: 使DSettings适配兼容DConfig
Influence: DSettings使用DConfig
Change-Id: I1e8485d4c087063536d17f5658a22babd74f31f4
2022-04-11 16:31:42 +08:00
ck dd9d3f9db7 chore: not check dtkcore2 and dtkcore5
防止重复加载这里去掉dtkcore2的加载,部分应用(deepin-system-monitor)
103x上有加载libdtkcore2,此处过滤掉

Bug: https://pms.uniontech.com/zentao/bug-view-103218.html
Log:
Influence: dtkcore2 和 dtkcore5 可同时加载
Change-Id: Ia110a2b726a905c5dc08536f0af36cceb84fed33
2022-04-11 16:31:42 +08:00
Ye ShanShan 91e41b12f2 fix: ut links failed
add dsgapplication.cpp to tests.

Log:
Influence: none
Change-Id: Ib3ca7ddf43e9f3de6e7ff7e9b94d8bcdb59be0ef
2022-04-06 14:42:14 +08:00
Ye ShanShan 498ed25a42 refactor: Change the way to get appId
get appId by DSGApplication.

Log: 
Influence: none
Change-Id: Ic4968cb97bc224eaf2e004f357a1518d58c874c2
2022-03-14 21:56:42 +08:00
Ye ShanShan 12ed6fea13 chore: add check for filesystemwatcher
add output and check information to hint inotify_init1 failed.

Log: 
Influence: none
Change-Id: I81ab483bc29115513c9d5e7a14b455e0e01b16aa
2022-03-14 21:56:22 +08:00
Ye ShanShan b5de9328a2 fix: modify loading order of application meta path
for application meta path loads order change from
/usr/share/dsg/apps/${appid}/confgis to
/usr/share/dsg/configs/${appid} or /usr/share/dsg/configs;
replace DStandardPaths::paths to DStandardPaths::path.
modify saved path。

Log:
Influence: all application's configuration would not be loaded
unless updating dtkcommon and it's application package.

Change-Id: Ia8212618fd2d4a5ecf67f05aad32a92d934ea01d
2022-03-12 12:34:37 +08:00
zccrs e47884a109 fix: add LIBDTKCORESHARED_EXPORT for DSGApplication
Export the DSGApplication symbols.
Pass the test case if can't write a file for the file watcher.

Influence: 无

Log:
Change-Id: I1e6b4827fc13ededb496393fe9d587e58d759ad4
2022-03-08 17:52:54 +08:00
zccrs 0c5dc30e89 feat: add DSGApplication class
The DSGApplication::id() return the application id string, the
application starter should add the "DSG_APP_ID" environment for it.

Influence: 无

Log:
Change-Id: Ifbea7f3f1d35873f0ff56373275e32f3d477a1d7
2022-03-04 14:46:56 +08:00
zccrs 33bfc9b25f refactor: add DStandardPaths::paths(DSG type) interface
The DSG::DataDir is a path list like the xdg data dirs, change the env "DSG_DATA_DIR"
to "DSG_DATA_DIRS".

Influence: dconfig 相关的改动,改变了获取配置文件路径的逻辑,与此相关的产品功能不应
该出现任何变化。

Log:
Change-Id: I5f12e42aee607ed749aa63f503c62e352c07b2a6
2022-03-02 15:16:01 +08:00
Chen Bin 8f69866f49 fix(DCI file): Soft link error
Soft link directories retain the original directory
rather than the directory in the relative DCI file,
resulting in the target file not being indexed correctly

Log:
Influence: dci tool
Change-Id: I15779b6b2552537ac2fd8be8f856d7b3d27be44e
2022-02-22 13:28:48 +08:00
Chen Bin a69a098352 feat: Merge branch 'dev/dci' into v23
Add some implementation of DCI.

Log:
Influence: dci
Change-Id: Ide236946abc52cd0da6f9ad08c98f564c68d7a95
2021-11-30 11:04:36 +08:00
Ye ShanShan 592f0e3acb fix: ut link error in community.
the member definition need to be separate in some build environment.

Log: 
Influence: build error in community.
Change-Id: Ia1724f44ee1cd7a27a067f128f9c0da93656ec7a
2021-11-25 18:54:56 +08:00
zccrs d2f6c41315 feat: 允许获取 dci 内部软链接文件的原始数据
对于 symlink 的目标路径而言,其内容非常灵活,当目标是项目路径时,其
真实的指向文件与链接文件本身所在的位置息息相关,原设计中默认将相对
路径转为 dci 内部的绝对路径,此举虽然方便了使用,但是却丢失了链接
文件的真实信息,当对 dci 格式与真实的文件系统进行导入导出时,将无法
获取链接文件的目标路径,因此添加 origin 参数,当其为 true 时将禁止
自动转换路径,直接返回原本的链接路径。
修复 dci 命令行工具未能正确处理软链接文件的存储和导出问题,QFileInfo
的 symlinkTarget 的设计也对链接内容就行了加工,无法满足使用场景,因此
改为使用 POSIX 中的 readlink 来获取原始的链接目标。

Log:
Change-Id: Ifd0abca205311d6075df65977672817debd0a7b4
2021-09-18 17:23:16 +08:00
zccrs adcff99e0c feat: Add the dci command tool project
提供 dci 命令行工具,支持将一个目录打包生成 dci 文件,或者反向将一个
dci 文件解包为一个目录。此工具支持非 Linux 平台,如 macos。

Log:
Change-Id: I4dec9877fa2cbff5ab1a23bf6a2ee65e7c4bb08f
2021-09-17 18:02:13 +08:00
zccrs f57551961e feat: 支持 DCI 文件保持按数字排序
根据 DSG 的标准,DCI 内的文件列表应当固定为从小往大的顺序,且此排序
支持数字模式。有序的文件列表可以简化对 DCI 内文件的解析,以减少DCI
文件加载模式下的计算量。

Log:
Change-Id: Ic6fc53ae33a0fab665605aa4b71fcdccf41e12c0
2021-09-17 15:45:37 +08:00
zccrs a6f8a024e2 feat: 添加注册 DDciFileEngine 的接口
不再默认创建 DDciFileEngine,全局对象会在库被加载时就创建,会在一定
程度上影响程序启动速度,并且这样的创建方式不可控制,库代码中应当尽
量避免创建全局对象,因此单独给出 registerFileEngine 接口,由使用方
自行在需要时调用。另外,QAbstractFileEngine::create 接口会在使用
QFile、QFileInfo、QDir 等接口时调用,但是使用 QFile 操作 DCI 文件
的场景非常的少,如果默认创建了 DDciFileEngine,则会导致非常多的无效
调用。

Log:
Change-Id: I7049e7c9a6b8e0e7f8ddeb6450bf56e5c98d0bfb
2021-09-03 11:20:39 +08:00
zccrs 3c08a5273e fix: 修复开启 -Werror=format-security 时编译错误
qCDebug 的第二个参数应当传入格式化字符串,其中 %s、%i 开头的内容会
特殊处理,如果为 qCDebug 传入的参数个数和格式化字符串中出现的 "%"
个数不匹配,则可能导致内存越界,存在安全风险。

Log:
Change-Id: I7c5870d34aca12d0aaf83933ea51115b1e27249b
2021-08-31 17:52:02 +08:00
zccrs 5bc0f0f828 feat: DDciFileEngine 支持判断内部路径是否为根目录
为 QFileInfo::isRoot 添加单元测试。

Log:
Change-Id: I28abe92abe10153dc8e2ad6a38157ef4c3c8b2e0
2021-08-31 14:41:59 +08:00
zccrs deed151229 feat: 为 DCI 文件添加软链接支持
根据 DSG 的标准规定,DCI 文件内可包含软链接,软链接不允许指向目录。
对于软链接文件内容的读写等价于对链接对象的读写。
同步在 DDciFileEngine 中支持软链接的创建和打开接口。

Log:
Change-Id: I4cac303171a1ea17e336dafe03385b1c8dd51212
2021-08-31 13:33:00 +08:00
zccrs 3697593f7c feat: 新增 DDciFile::copy 接口
使用 DDciFile::dataRef 和 DDciFile:writeFile 的组合能实现复制文件的
效果,但是无法实现目录的复制。因此,特单独添加 DDciFile::copy,以方
便复制文件和目录。

Log:
Change-Id: I650e13e45fa94e4ff9b197504025915c20a8c00d
2021-08-30 16:42:41 +08:00
zccrs 5fb1c1812e feat: 添加 DDciFileEngine
DDciFileEngine 实现了 QAbstractFileEngine,可以直接使用 QFile、
QFileInfo 等 Qt 的文件接口操作 DCI 文件。将打包的 DCI 文件看作一个
目录,类似于 "qrc",绑定 "dci:" 开头的路径,以识别对 DCI 文件进行的
IO 操作。

Log:
Change-Id: Iaff407294b211fa869cd4ad74322098160fdb9b5
2021-08-30 16:42:26 +08:00
zccrs ef10d221c9 feat: 支持 DCI 文件的解析
DCI 文件是 DSG 标准规定的一种图标文件格式,其是一个压缩格式,内部可
嵌入 jpg png 等图片文件。

DDciFile 实现了对 DCI 格式打包和解包的操作,提供了文件/目录创建、改写
、获取目录下文件列表等接口

对应的 DSG 规范地址:
https://gitlabwh.uniontech.com/wuhan/se/deepin-specifications/-/issues/5

Log:

Change-Id: I81925fed14e35d42bcb2b0905aac5c2b6c5d817d
2021-08-30 14:15:13 +08:00
398 changed files with 50104 additions and 36122 deletions

196
.clang-format Normal file
View File

@ -0,0 +1,196 @@
---
# 语言: None, Cpp, Java, JavaScript, ObjC, Proto, TableGen, TextProto
Language: Cpp
# BasedOnStyle: LLVM
# 访问说明符(public、private等)的偏移
AccessModifierOffset: -4
# 开括号(开圆括号、开尖括号、开方括号)后的对齐: Align, DontAlign, AlwaysBreak(总是在开括号后换行)
AlignAfterOpenBracket: Align
# 连续赋值时,对齐所有等号
AlignConsecutiveAssignments: None
# 连续声明时,对齐所有声明的变量名
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Right
# 左对齐逃脱换行(使用反斜杠换行)的反斜杠
#AlignEscapedNewlinesLeft: true
# 水平对齐二元和三元表达式的操作数
AlignOperands: true
# 对齐连续的尾随的注释
AlignTrailingComments: true
# 允许函数声明的所有参数在放在下一行
AllowAllParametersOfDeclarationOnNextLine: true
# 允许短的块放在同一行
AllowShortBlocksOnASingleLine: Empty
# 允许短的case标签放在同一行
AllowShortCaseLabelsOnASingleLine: false
# 允许短的函数放在同一行: None, InlineOnly(定义在类中), Empty(空函数), Inline(定义在类中,空函数), All
AllowShortFunctionsOnASingleLine: Inline
# 允许短的if语句保持在同一行
AllowShortIfStatementsOnASingleLine: false
# 允许短的循环保持在同一行
AllowShortLoopsOnASingleLine: false
# 总是在定义返回类型后换行(deprecated)
AlwaysBreakAfterDefinitionReturnType: None
# 总是在返回类型后换行: None, All, TopLevel(顶级函数,不包括在类中的函数),
# AllDefinitions(所有的定义,不包括声明), TopLevelDefinitions(所有的顶级函数的定义)
AlwaysBreakAfterReturnType: None
# 总是在多行string字面量前换行
AlwaysBreakBeforeMultilineStrings: false
# 总是在template声明后换行
AlwaysBreakTemplateDeclarations: Yes
# false表示函数实参要么都在同一行要么都各自一行
BinPackArguments: false
# false表示所有形参要么都在同一行要么都各自一行
BinPackParameters: false
# 大括号换行只有当BreakBeforeBraces设置为Custom时才有效
BraceWrapping:
# class定义后面
AfterClass: true
# 控制语句后面
AfterControlStatement: Never
# enum定义后面
AfterEnum: false
# 函数定义后面
AfterFunction: true
# 命名空间定义后面
AfterNamespace: false
# ObjC定义后面
AfterObjCDeclaration: false
# struct定义后面
AfterStruct: true
# union定义后面
AfterUnion: true
AfterExternBlock: false
# catch之前
BeforeCatch: false
# else之前
BeforeElse: false
# 缩进大括号
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
# 在二元运算符前换行: None(在操作符后换行), NonAssignment(在非赋值的操作符前换行), All(在操作符前换行)
BreakBeforeBinaryOperators: None
# 在大括号前换行: Attach(始终将大括号附加到周围的上下文), Linux(除函数、命名空间和类定义与Attach类似),
# Mozilla(除枚举、函数、记录定义与Attach类似), Stroustrup(除函数定义、catch、else与Attach类似),
# Allman(总是在大括号前换行), GNU(总是在大括号前换行,并对于控制语句的大括号增加额外的缩进), WebKit(在函数前换行), Custom
# 注:这里认为语句块也属于函数
BreakBeforeBraces: Custom
# 在三元运算符前换行
BreakBeforeTernaryOperators: false
# 在构造函数的初始化列表的逗号前换行
BreakConstructorInitializersBeforeComma: true
BreakConstructorInitializers: BeforeColon
# 每行字符的限制0表示没有限制
ColumnLimit: 130
# 描述具有特殊意义的注释的正则表达式,它不应该被分割为多行或以其它方式改变
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
# 构造函数的初始化列表要么都在同一行,要么都各自一行
ConstructorInitializerAllOnOneLineOrOnePerLine: false
# 构造函数的初始化列表的缩进宽度
ConstructorInitializerIndentWidth: 4
# 延续的行的缩进宽度
ContinuationIndentWidth: 4
# 去除C++11的列表初始化的大括号{后和}前的空格
Cpp11BracedListStyle: true
# 继承最常用的指针和引用的对齐方式
DerivePointerAlignment: false
# 关闭格式化
DisableFormat: false
# 自动检测函数的调用和定义是否被格式为每行一个参数(Experimental)
ExperimentalAutoDetectBinPacking: false
# 需要被解读为foreach循环而不是函数调用的宏
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
# 对#include进行排序匹配了某正则表达式的#include拥有对应的优先级匹配不到的则默认优先级为INT_MAX(优先级越小排序越靠前)
# 可以定义负数优先级从而保证某些#include永远在最前面
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
# 缩进case标签
IndentCaseLabels: true
#IndentPPDirectives: AfterHash
# 缩进宽度
IndentWidth: 4
# 函数返回类型换行时,缩进函数声明或函数定义的函数名
IndentWrappedFunctionNames: false
# 保留在块开始处的空行
KeepEmptyLinesAtTheStartOfBlocks: false
# 开始一个块的宏的正则表达式
MacroBlockBegin: ''
# 结束一个块的宏的正则表达式
MacroBlockEnd: ''
# 连续空行的最大数量
MaxEmptyLinesToKeep: 1
# 命名空间的缩进: None, Inner(缩进嵌套的命名空间中的内容), All
NamespaceIndentation: Inner
# 使用ObjC块时缩进宽度
ObjCBlockIndentWidth: 4
# 在ObjC的@property后添加一个空格
ObjCSpaceAfterProperty: false
# 在ObjC的protocol列表前添加一个空格
ObjCSpaceBeforeProtocolList: true
# 在call(后对函数调用换行的penalty
PenaltyBreakBeforeFirstCallParameter: 19
# 在一个注释中引入换行的penalty
PenaltyBreakComment: 300
# 第一次在<<前换行的penalty
PenaltyBreakFirstLessLess: 120
# 在一个字符串字面量中引入换行的penalty
PenaltyBreakString: 1000
# 对于每个在行字符数限制之外的字符的penalty
PenaltyExcessCharacter: 1000000
# 将函数的返回类型放到它自己的行的penalty
PenaltyReturnTypeOnItsOwnLine: 60
# 指针和引用的对齐: Left, Right, Middle
PointerAlignment: Right
# 允许重新排版注释
ReflowComments: true
# 允许排序#include
SortIncludes: Never
# 在C风格类型转换后添加空格
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
# 在赋值运算符之前添加空格
SpaceBeforeAssignmentOperators: true
# 开圆括号之前添加一个空格: Never, ControlStatements, Always
SpaceBeforeParens: ControlStatements
# 在空的圆括号中添加空格
SpaceInEmptyParentheses: false
# 在尾随的评论前添加的空格数(只适用于//)
SpacesBeforeTrailingComments: 2
# 在尖括号的<后和>前添加空格
SpacesInAngles: false
# 在容器(ObjC和JavaScript的数组和字典等)字面量中添加空格
SpacesInContainerLiterals: false
# 在C风格类型转换的括号中添加空格
SpacesInCStyleCastParentheses: false
# 在圆括号的(后和)前添加空格
SpacesInParentheses: false
# 在方括号的[后和]前添加空格lamda表达式和未指明大小的数组的声明不受影响
SpacesInSquareBrackets: false
# 标准: Cpp03, Cpp11, Auto
Standard: Auto
# tab宽度
TabWidth: 4
# 使用tab字符: Never, ForIndentation, ForContinuationAndIndentation, Always
UseTab: Never

17
.github/ISSUE_TEMPLATE/document.md vendored Normal file
View File

@ -0,0 +1,17 @@
---
name: Docs update
about: Document Normalization
title: 'Doc: [Document Type][file name]'
labels: 'Doc'
assignees: ''
---
## Target files (目标文件)
## Planned completion time (计划完成时间)
## Document Type (文档类型)
[] New documents
[] Standardized documents
[] Internationalization of documents
[] Example documents

50
.github/workflows/auto-release.yml vendored Normal file
View File

@ -0,0 +1,50 @@
name: Auto Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., 1.0.0)'
type: string
required: false
name:
description: 'The name of the person to release the version'
type: string
required: false
email:
description: 'The email of the person to release the version'
type: string
required: false
timezone:
description: 'The timezone in the debian changelog file'
required: false
type: string
default: 'Asia/Shanghai'
workflow_call:
inputs:
version:
description: 'Release version (e.g., 1.0.0)'
type: string
required: true
name:
description: 'The name of the person to release the version'
type: string
required: false
email:
description: 'The email of the person to release the version'
type: string
required: false
timezone:
description: 'The timezone in the debian changelog file'
required: false
type: string
default: 'Asia/Shanghai'
jobs:
auto_tag:
uses: linuxdeepin/.github/.github/workflows/auto-release.yml@master
secrets: inherit
with:
version: ${{ inputs.version }}
name: ${{ inputs.name }}
email: ${{ inputs.email }}
timezone: ${{ inputs.timezone }}

View File

@ -6,47 +6,10 @@ concurrency:
cancel-in-progress: true
jobs:
backup-to-gitlab:
if: github.repository_owner == 'linuxdeepin'
name: backup-to-gitlab
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: "linuxdeepin/jenkins-bridge-client"
path: jenkins-bridge-client
- name: Install Client
run: |
cd $GITHUB_WORKSPACE/jenkins-bridge-client
go build .
sudo install -Dvm755 jenkins-bridge-client -t /usr/bin/
- name: Trigger sync
id: generate-runid
run: |
echo "::set-output name=RUN_ID::$(jenkins-bridge-client -triggerSync -token '${{ secrets.BRIDGETOKEN }}')"
- name: Print log
run: |
jenkins-bridge-client -printlog -token "${{ secrets.BRIDGETOKEN }}" -runid "${{ steps.generate-runid.outputs.RUN_ID }}"
backup-to-gitlabwh:
uses: linuxdeepin/.github/.github/workflows/backup-to-gitlabwh.yml@master
secrets: inherit
backup-to-gitee:
if: github.repository_owner == 'linuxdeepin'
runs-on: ubuntu-latest
steps:
- name: create-repo
run: |
repo=${{ github.event.repository.name }}
homepage="https://github.com/linuxdeepin/${repo}"
description="mirror of ${homepage}"
# remove '.' prefix
repo=${repo#"."}
curl -X POST --header 'Content-Type: application/json;charset=UTF-8' 'https://gitee.com/api/v5/enterprises/linuxdeepin/repos' -d '{"private": 1,"access_token":"${{ secrets.GITEE_SYNC_TOKEN }}","name":"'"$repo"'","description":"'"$description"'","homepage":"'"$homepage"'","has_issues":"false","has_wiki":"false","can_comment":"false"}' || true
- name: push
run: |
git clone --bare https://github.com/linuxdeepin/${{ github.event.repository.name }}.git .git
repo=${{ github.event.repository.name }}
# remove '.' prefix
repo=${repo#"."}
git remote set-url origin https://myml:${{ secrets.GITEE_SYNC_TOKEN }}@gitee.com/linuxdeepin/${repo}.git
git push -f --all --prune origin
git push --tags origin
uses: linuxdeepin/.github/.github/workflows/backup-to-gitee.yml@master
secrets: inherit

View File

@ -10,8 +10,4 @@ on:
jobs:
check_job:
uses: linuxdeepin/.github/.github/workflows/build-distribution.yml@master
secrets:
BUILD_GPG_PRIVATE_KEY: ${{ secrets.BUILD_GPG_PRIVATE_KEY }}
BUILD_SSH_PRIVATE_KEY: ${{ secrets.BUILD_SSH_PRIVATE_KEY }}
WEBDAV_PASSWD: ${{ secrets.WEBDAV_PASSWD }}
WEBDAV_USER: ${{ secrets.WEBDAV_USER }}
secrets: inherit

View File

@ -6,5 +6,4 @@ on:
jobs:
chatopt:
uses: linuxdeepin/.github/.github/workflows/chatOps.yml@master
secrets:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
secrets: inherit

View File

@ -1,4 +1,4 @@
name: Call build-deb
name: doxygen-check
on:
pull_request_target:
paths-ignore:
@ -10,6 +10,5 @@ concurrency:
jobs:
check_job:
uses: linuxdeepin/.github/.github/workflows/build-deb.yml@master
secrets:
BridgeToken: ${{ secrets.BridgeToken }}
uses: linuxdeepin/.github/.github/workflows/doc-check.yml@master
secrets: inherit

View File

@ -0,0 +1,16 @@
name: Call License and README Check
on:
pull_request_target:
types: [opened, synchronize, reopened]
permissions:
pull-requests: write
contents: read
concurrency:
group: ${{ github.workflow }}-pull/${{ github.event.number }}
cancel-in-progress: true
jobs:
license-check:
uses: linuxdeepin/.github/.github/workflows/license-check.yml@master

View File

@ -0,0 +1,19 @@
name: Call synchronize to dtk6
on:
pull_request_target:
paths-ignore:
- "debian/**"
- "archlinux/**"
- "rpm/**"
- ".obs/**"
- ".github/**"
jobs:
call-synchronize:
uses: linuxdeepin/dtk/.github/workflows/synchronize-to-dtk6.yml@master
secrets: inherit
with:
dest_repo: linuxdeepin/dtk6core
source_repo: ${{ github.event.pull_request.head.repo.full_name }}
source_ref: ${{ github.event.pull_request.head.ref }}
pull_number: ${{ github.event.pull_request.number }}

View File

@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- run: export
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false

16
.gitignore vendored
View File

@ -3,6 +3,7 @@
*.lo
*.o
# Compiled Dynamic libraries
*.so
*.dylib
@ -20,12 +21,21 @@ build*/
*.qm
src/DtkCores
src/dtkcore_config.h
cmake/DtkCore/DtkCoreConfig.cmake
src/qt_lib_d*.pri
bin/
.qmake*
Makefile
cmake/DtkCore*
.cache
*.pc
*.pri
dtkcore_config.h
*.user
#tools
.vscode
.idea
# Ignore Doxygen theme files
docs/doxygen-theme/

51
.obs/workflows.yml Normal file
View File

@ -0,0 +1,51 @@
test_build:
steps:
- link_package:
source_project: deepin:Develop:dde
source_package: %{SCM_REPOSITORY_NAME}
target_project: deepin:CI
- configure_repositories:
project: deepin:CI
repositories:
- name: deepin_develop
paths:
- target_project: deepin:CI
target_repository: deepin_develop
architectures:
- x86_64
- aarch64
- name: debian
paths:
- target_project: deepin:CI
target_repository: debian_sid
architectures:
- x86_64
- name: archlinux
paths:
- target_project: deepin:CI
target_repository: archlinux
architectures:
- x86_64
filters:
event: pull_request
tag_build:
steps:
- branch_package:
source_project: deepin:Develop:dde
source_package: %{SCM_REPOSITORY_NAME}
target_project: deepin:Unstable:dde
filters:
event: tag_push
commit_build:
steps:
- trigger_services:
project: deepin:Develop:dde
package: %{SCM_REPOSITORY_NAME}
filters:
event: push

View File

@ -1 +0,0 @@
DTK_VERSION=

94
.reuse/dep5 Normal file
View File

@ -0,0 +1,94 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: dtkcore
Upstream-Contact: UnionTech Software Technology Co., Ltd. <>
Source: https://github.com/linuxdeepin/dtkcore
# Sample paragraph, commented out:
#
# Files: src/*
# Copyright: $YEAR $NAME <$CONTACT>
# License: ...
# ci
Files: .github/* *.yml *.yaml .obs/* .syncexclude
Copyright: None
License: CC0-1.0
# git
Files: .gitignore
Copyright: None
License: CC0-1.0
# config
Files: *.toml *.conf *.json .clang-format
Copyright: None
License: CC0-1.0
# qt
Files: *.pro *.pri *.qrc *.prf
Copyright: None
License: CC0-1.0
# cmake
Files: *.cmake *CMakeLists.txt *.pc.in, cmake/*.in misc/*.in VERSION VERSION.in
Copyright: None
License: CC0-1.0
# debian
Files: debian/*
Copyright: None
License: CC0-1.0
# Arch
Files: archlinux/*
Copyright: None
License: CC0-1.0
# rpm
Files: rpm/*
Copyright: None
License: CC0-1.0
# docs
Files: *.dox *.md src/util/README.dpinyin tools/qdbusxml2cpp/README
Copyright: UnionTech Software Technology Co., Ltd.
License: CC-BY-4.0
# doxygen src
Files: docs/src/*
Copyright: None
License: CC0-1.0
# interface
Files: include/DtkCore/D*
Copyright: None
License: CC0-1.0
# others
Files: src/util/resources/dpinyin.dict tests/data/LGPLv3.txt
Copyright: None
License: CC0-1.0
Files: src/log/*
Copyright: UnionTech Software Technology Co., Ltd.
License: LGPL-3.0-or-later
#doxygentheme
Files: docs/doxygentheme/*
Copyright: Copyright (c) 2021 - 2022 jothepro
License: MIT
#reference
Files: docs/references/*
Copyright: UnionTech Software Technology Co., Ltd.
License: CC-BY-4.0
Files: toolGenerate/**/*
Copyright: None
License: CC0-1.0
Files: src/log/dconfig_org_deepin_dtk_preference.hpp
Copyright: None
License: CC0-1.0

13
.syncexclude Normal file
View File

@ -0,0 +1,13 @@
# Paths that will be exclude from synchronize workflow
# Please use relative path which use project directory as root
# Notice that
# * .git
# * debian
# * archlinux
# * .obs
# * .github
# are always ignored
linglong.yaml
conanfile.py
VERSION
CHANGELOG.md

View File

@ -1,3 +1,105 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [5.7.25] - 2025-10-30
## [5.7.24] - 2025-10-16
### Added
- Support Qt 6.10
### Fixed
- Replace rmdir with rename for directory operations
- Prevent thread-safety issue in D-Bus config manager
- Sync with qt5platform-plugins
## [5.7.23] - 2025-09-25
### Added
- Add fallback type conversion in demarshall function
### Changed
- Feat: DPinyin::firstLetters support set ToneStyle
- 增加服务器教育版和国防版
### Fixed
- Fix trash validation for symlinks
- Fix heap-use-after-free issue
- Fix dconfig static variable release issue
## [5.7.22] - 2025-09-04
### Fixed
- Resolve non-reproducible DBUS code generation issue
## [5.7.21] - 2025-08-14
### Added
- Add deprecation ignore support for DTK
## [5.7.20] - 2025-07-31
### Changed
- Improve D-Bus resource management with RAII
### Fixed
- Use QCoreApplication for application name
- Resolve compilation warnings and Qt6 compatibility issues
## [5.7.19] - 2025-07-03
### Added
- Add security hardening flags to build configuration
### Changed
- Replace QtDBus with libdbus-1 in dsgapplication
## [5.7.18] - 2025-06-27
### Fixed
- Improve logging rules environment variable handling
- Copy cachePrefix in DConfigFile copy constructor
- Make version parameter optional in release workflow
## [5.7.17] - 2025-06-18
### Added
- Feat(ci): add auto release
- Add license for VERSION.in
### Changed
- Support VERSION file
- Update .syncexclude
### Fixed
- .deepin@main -> .deepin@master
<a name="5.7.14"></a>
## 5.7.14 (2025-04-12)
### Bug Fixes
* resolve compilation failure on Qt 6.9
<a name="2.0.14"></a>
## 2.0.14 (2019-05-23)

View File

@ -1,16 +1,30 @@
cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.13)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" DTK_FILE_VERSION)
string(STRIP "${DTK_FILE_VERSION}" DTK_FILE_VERSION)
set(DTK_VERSION "${DTK_FILE_VERSION}" CACHE STRING "DTK version")
project (DtkCore
VERSION "${DTK_REPO_MODULE_VERSION}"
DESCRIPTION "DTK Core module"
HOMEPAGE_URL ""
LANGUAGES CXX C
VERSION ${DTK_VERSION}
DESCRIPTION "DTK Core module"
HOMEPAGE_URL "https://github.com/linuxdeepin/dtkcore"
LANGUAGES CXX C
)
find_package (Qt5 CONFIG REQUIRED COMPONENTS DBus Xml)
set (BUILD_DOCS ON CACHE BOOL "Generate doxygen-based documentation")
if (BUILD_DOCS)
add_subdirectory(doc)
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX /usr)
endif ()
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
if("${PROJECT_VERSION_MAJOR}" STREQUAL "5")
set(QT_VERSION_MAJOR "5")
elseif("${PROJECT_VERSION_MAJOR}" STREQUAL "6")
set(QT_VERSION_MAJOR "6")
set(DTK_VERSION_MAJOR "6")
else()
message(SEND_ERROR "not support Prject Version ${PROJECT_VERSION}.")
endif()
include(dtkcore.cmake)

395
LICENSE
View File

@ -1,165 +1,304 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
0. Additional Definitions.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
2. Conveying Modified Versions.
a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
3. Object Code Incorporating Material from Library Header Files.
b) Accompany the object code with a copy of the GNU GPL and this license document.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
4. Combined Works.
You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
4. Combined Works.
c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
d) Do one of the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
d) Do one of the following:
5. Combined Libraries.
You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
5. Combined Libraries.
Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
6. Revised Versions of the GNU Lesser General Public License.
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Preamble
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
The GNU General Public License is a free, copyleft license for software and other kinds of works.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS
0. Definitions.
“This License” refers to version 3 of the GNU General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
A “covered work” means either the unmodified Program or a work based on the Program.
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.

11
LICENSES/BSD-3-Clause.txt Normal file
View File

@ -0,0 +1,11 @@
Copyright (c) <year> <owner>.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

156
LICENSES/CC-BY-4.0.txt Normal file
View File

@ -0,0 +1,156 @@
Creative Commons Attribution 4.0 International
Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors.
Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensors permission is not necessary for any reasonfor example, because of any applicable exception or limitation to copyrightthen that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public.
Creative Commons Attribution 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
Section 1 Definitions.
a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
Section 2 Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
A. reproduce and Share the Licensed Material, in whole or in part; and
B. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
3. Term. The term of this Public License is specified in Section 6(a).
4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
5. Downstream recipients.
A. Offer from the Licensor Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
B. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
Section 3 License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified form), You must:
A. retain the following if it is supplied by the Licensor with the Licensed Material:
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
Section 4 Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
Section 5 Disclaimer of Warranties and Limitation of Liability.
a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
Section 6 Term and Termination.
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.
c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
Section 7 Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
Section 8 Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
Creative Commons may be contacted at creativecommons.org.

121
LICENSES/CC0-1.0.txt Normal file
View File

@ -0,0 +1,121 @@
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.

View File

@ -0,0 +1,468 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts as the
successor of the GNU Library Public License, version 2, hence the version
number 2.1.]
Preamble
The licenses for most software are designed to take away your freedom to share
and change it. By contrast, the GNU General Public Licenses are intended to
guarantee your freedom to share and change free software--to make sure the
software is free for all its users.
This license, the Lesser General Public License, applies to some specially
designated software packages--typically libraries--of the Free Software Foundation
and other authors who decide to use it. You can use it too, but we suggest
you first think carefully about whether this license or the ordinary General
Public License is the better strategy to use in any particular case, based
on the explanations below.
When we speak of free software, we are referring to freedom of use, not price.
Our General Public Licenses are designed to make sure that you have the freedom
to distribute copies of free software (and charge for this service if you
wish); that you receive source code or can get it if you want it; that you
can change the software and use pieces of it in new free programs; and that
you are informed that you can do these things.
To protect your rights, we need to make restrictions that forbid distributors
to deny you these rights or to ask you to surrender these rights. These restrictions
translate to certain responsibilities for you if you distribute copies of
the library or if you modify it.
For example, if you distribute copies of the library, whether gratis or for
a fee, you must give the recipients all the rights that we gave you. You must
make sure that they, too, receive or can get the source code. If you link
other code with the library, you must provide complete object files to the
recipients, so that they can relink them with the library after making changes
to the library and recompiling it. And you must show them these terms so they
know their rights.
We protect your rights with a two-step method: (1) we copyright the library,
and (2) we offer you this license, which gives you legal permission to copy,
distribute and/or modify the library.
To protect each distributor, we want to make it very clear that there is no
warranty for the free library. Also, if the library is modified by someone
else and passed on, the recipients should know that what they have is not
the original version, so that the original author's reputation will not be
affected by problems that might be introduced by others.
Finally, software patents pose a constant threat to the existence of any free
program. We wish to make sure that a company cannot effectively restrict the
users of a free program by obtaining a restrictive license from a patent holder.
Therefore, we insist that any patent license obtained for a version of the
library must be consistent with the full freedom of use specified in this
license.
Most GNU software, including some libraries, is covered by the ordinary GNU
General Public License. This license, the GNU Lesser General Public License,
applies to certain designated libraries, and is quite different from the ordinary
General Public License. We use this license for certain libraries in order
to permit linking those libraries into non-free programs.
When a program is linked with a library, whether statically or using a shared
library, the combination of the two is legally speaking a combined work, a
derivative of the original library. The ordinary General Public License therefore
permits such linking only if the entire combination fits its criteria of freedom.
The Lesser General Public License permits more lax criteria for linking other
code with the library.
We call this license the "Lesser" General Public License because it does Less
to protect the user's freedom than the ordinary General Public License. It
also provides other free software developers Less of an advantage over competing
non-free programs. These disadvantages are the reason we use the ordinary
General Public License for many libraries. However, the Lesser license provides
advantages in certain special circumstances.
For example, on rare occasions, there may be a special need to encourage the
widest possible use of a certain library, so that it becomes a de-facto standard.
To achieve this, non-free programs must be allowed to use the library. A more
frequent case is that a free library does the same job as widely used non-free
libraries. In this case, there is little to gain by limiting the free library
to free software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free programs
enables a greater number of people to use a large body of free software. For
example, permission to use the GNU C Library in non-free programs enables
many more people to use the whole GNU operating system, as well as its variant,
the GNU/Linux operating system.
Although the Lesser General Public License is Less protective of the users'
freedom, it does ensure that the user of a program that is linked with the
Library has the freedom and the wherewithal to run that program using a modified
version of the Library.
The precise terms and conditions for copying, distribution and modification
follow. Pay close attention to the difference between a "work based on the
library" and a "work that uses the library". The former contains code derived
from the library, whereas the latter must be combined with the library in
order to run.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other program
which contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Lesser General
Public License (also called "this License"). Each licensee is addressed as
"you".
A "library" means a collection of software functions and/or data prepared
so as to be conveniently linked with application programs (which use some
of those functions and data) to form executables.
The "Library", below, refers to any such software library or work which has
been distributed under these terms. A "work based on the Library" means either
the Library or any derivative work under copyright law: that is to say, a
work containing the Library or a portion of it, either verbatim or with modifications
and/or translated straightforwardly into another language. (Hereinafter, translation
is included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for making modifications
to it. For a library, complete source code means all the source code for all
modules it contains, plus any associated interface definition files, plus
the scripts used to control compilation and installation of the library.
Activities other than copying, distribution and modification are not covered
by this License; they are outside its scope. The act of running a program
using the Library is not restricted, and output from such a program is covered
only if its contents constitute a work based on the Library (independent of
the use of the Library in a tool for writing it). Whether that is true depends
on what the Library does and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's complete source
code as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and disclaimer
of warranty; keep intact all the notices that refer to this License and to
the absence of any warranty; and distribute a copy of this License along with
the Library.
You may charge a fee for the physical act of transferring a copy, and you
may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Library or any portion of it,
thus forming a work based on the Library, and copy and distribute such modifications
or work under the terms of Section 1 above, provided that you also meet all
of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices stating that
you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no charge to all
third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a table of
data to be supplied by an application program that uses the facility, other
than as an argument passed when the facility is invoked, then you must make
a good faith effort to ensure that, in the event an application does not supply
such function or table, the facility still operates, and performs whatever
part of its purpose remains meaningful.
(For example, a function in a library to compute square roots has a purpose
that is entirely well-defined independent of the application. Therefore, Subsection
2d requires that any application-supplied function or table used by this function
must be optional: if the application does not supply it, the square root function
must still compute square roots.)
These requirements apply to the modified work as a whole. If identifiable
sections of that work are not derived from the Library, and can be reasonably
considered independent and separate works in themselves, then this License,
and its terms, do not apply to those sections when you distribute them as
separate works. But when you distribute the same sections as part of a whole
which is a work based on the Library, the distribution of the whole must be
on the terms of this License, whose permissions for other licensees extend
to the entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest your
rights to work written entirely by you; rather, the intent is to exercise
the right to control the distribution of derivative or collective works based
on the Library.
In addition, mere aggregation of another work not based on the Library with
the Library (or with a work based on the Library) on a volume of a storage
or distribution medium does not bring the other work under the scope of this
License.
3. You may opt to apply the terms of the ordinary GNU General Public License
instead of this License to a given copy of the Library. To do this, you must
alter all the notices that refer to this License, so that they refer to the
ordinary GNU General Public License, version 2, instead of to this License.
(If a newer version than version 2 of the ordinary GNU General Public License
has appeared, then you can specify that version instead if you wish.) Do not
make any other change in these notices.
Once this change is made in a given copy, it is irreversible for that copy,
so the ordinary GNU General Public License applies to all subsequent copies
and derivative works made from that copy.
This option is useful when you wish to copy part of the code of the Library
into a program that is not a library.
4. You may copy and distribute the Library (or a portion or derivative of
it, under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you accompany it with the complete corresponding
machine-readable source code, which must be distributed under the terms of
Sections 1 and 2 above on a medium customarily used for software interchange.
If distribution of object code is made by offering access to copy from a designated
place, then offering equivalent access to copy the source code from the same
place satisfies the requirement to distribute the source code, even though
third parties are not compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the Library, but
is designed to work with the Library by being compiled or linked with it,
is called a "work that uses the Library". Such a work, in isolation, is not
a derivative work of the Library, and therefore falls outside the scope of
this License.
However, linking a "work that uses the Library" with the Library creates an
executable that is a derivative of the Library (because it contains portions
of the Library), rather than a "work that uses the library". The executable
is therefore covered by this License. Section 6 states terms for distribution
of such executables.
When a "work that uses the Library" uses material from a header file that
is part of the Library, the object code for the work may be a derivative work
of the Library even though the source code is not. Whether this is true is
especially significant if the work can be linked without the Library, or if
the work is itself a library. The threshold for this to be true is not precisely
defined by law.
If such an object file uses only numerical parameters, data structure layouts
and accessors, and small macros and small inline functions (ten lines or less
in length), then the use of the object file is unrestricted, regardless of
whether it is legally a derivative work. (Executables containing this object
code plus portions of the Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may distribute
the object code for the work under the terms of Section 6. Any executables
containing that work also fall under Section 6, whether or not they are linked
directly with the Library itself.
6. As an exception to the Sections above, you may also combine or link a "work
that uses the Library" with the Library to produce a work containing portions
of the Library, and distribute that work under terms of your choice, provided
that the terms permit modification of the work for the customer's own use
and reverse engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the Library
is used in it and that the Library and its use are covered by this License.
You must supply a copy of this License. If the work during execution displays
copyright notices, you must include the copyright notice for the Library among
them, as well as a reference directing the user to the copy of this License.
Also, you must do one of these things:
a) Accompany the work with the complete corresponding machine-readable source
code for the Library including whatever changes were used in the work (which
must be distributed under Sections 1 and 2 above); and, if the work is an
executable linked with the Library, with the complete machine-readable "work
that uses the Library", as object code and/or source code, so that the user
can modify the Library and then relink to produce a modified executable containing
the modified Library. (It is understood that the user who changes the contents
of definitions files in the Library will not necessarily be able to recompile
the application to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the Library. A
suitable mechanism is one that (1) uses at run time a copy of the library
already present on the user's computer system, rather than copying library
functions into the executable, and (2) will operate properly with a modified
version of the library, if the user installs one, as long as the modified
version is interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at least three years,
to give the same user the materials specified in Subsection 6a, above, for
a charge no more than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy from a designated
place, offer equivalent access to copy the above specified materials from
the same place.
e) Verify that the user has already received a copy of these materials or
that you have already sent this user a copy.
For an executable, the required form of the "work that uses the Library" must
include any data and utility programs needed for reproducing the executable
from it. However, as a special exception, the materials to be distributed
need not include anything that is normally distributed (in either source or
binary form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component itself
accompanies the executable.
It may happen that this requirement contradicts the license restrictions of
other proprietary libraries that do not normally accompany the operating system.
Such a contradiction means you cannot use both them and the Library together
in an executable that you distribute.
7. You may place library facilities that are a work based on the Library side-by-side
in a single library together with other library facilities not covered by
this License, and distribute such a combined library, provided that the separate
distribution of the work based on the Library and of the other library facilities
is otherwise permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work based on the
Library, uncombined with any other library facilities. This must be distributed
under the terms of the Sections above.
b) Give prominent notice with the combined library of the fact that part of
it is a work based on the Library, and explaining where to find the accompanying
uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute the Library
except as expressly provided under this License. Any attempt otherwise to
copy, modify, sublicense, link with, or distribute the Library is void, and
will automatically terminate your rights under this License. However, parties
who have received copies, or rights, from you under this License will not
have their licenses terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not signed
it. However, nothing else grants you permission to modify or distribute the
Library or its derivative works. These actions are prohibited by law if you
do not accept this License. Therefore, by modifying or distributing the Library
(or any work based on the Library), you indicate your acceptance of this License
to do so, and all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the Library),
the recipient automatically receives a license from the original licensor
to copy, distribute, link with or modify the Library subject to these terms
and conditions. You may not impose any further restrictions on the recipients'
exercise of the rights granted herein. You are not responsible for enforcing
compliance by third parties with this License.
11. If, as a consequence of a court judgment or allegation of patent infringement
or for any other reason (not limited to patent issues), conditions are imposed
on you (whether by court order, agreement or otherwise) that contradict the
conditions of this License, they do not excuse you from the conditions of
this License. If you cannot distribute so as to satisfy simultaneously your
obligations under this License and any other pertinent obligations, then as
a consequence you may not distribute the Library at all. For example, if a
patent license would not permit royalty-free redistribution of the Library
by all those who receive copies directly or indirectly through you, then the
only way you could satisfy both it and this License would be to refrain entirely
from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents
or other property right claims or to contest validity of any such claims;
this section has the sole purpose of protecting the integrity of the free
software distribution system which is implemented by public license practices.
Many people have made generous contributions to the wide range of software
distributed through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing to
distribute software through any other system and a licensee cannot impose
that choice.
This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in certain
countries either by patents or by copyrighted interfaces, the original copyright
holder who places the Library under this License may add an explicit geographical
distribution limitation excluding those countries, so that distribution is
permitted only in or among countries not thus excluded. In such case, this
License incorporates the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new versions of
the Lesser General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to address
new problems or concerns.
Each version is given a distinguishing version number. If the Library specifies
a version number of this License which applies to it and "any later version",
you have the option of following the terms and conditions either of that version
or of any later version published by the Free Software Foundation. If the
Library does not specify a license version number, you may choose any version
ever published by the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free programs
whose distribution conditions are incompatible with these, write to the author
to ask for permission. For software which is copyrighted by the Free Software
Foundation, write to the Free Software Foundation; we sometimes make exceptions
for this. Our decision will be guided by the two goals of preserving the free
status of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA
OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES
OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH
HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest possible
use to the public, we recommend making it free software that everyone can
redistribute and change. You can do so by permitting redistribution under
these terms (or, alternatively, under the terms of the ordinary General Public
License).
To apply these terms, attach the following notices to the library. It is safest
to attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the "copyright"
line and a pointer to where the full notice is found.
<one line to give the library's name and an idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 2.1 of the License, or (at your option)
any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
You should have received a copy of the GNU Lesser General Public License along
with this library; if not, write to the Free Software Foundation, Inc., 51
Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your school,
if any, to sign a "copyright disclaimer" for the library, if necessary. Here
is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in
the library `Frob' (a library for tweaking knobs) written
by James Random Hacker.
< signature of Ty Coon > , 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@ -0,0 +1,304 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License.
"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version".
The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS
0. Definitions.
“This License” refers to version 3 of the GNU General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
A “covered work” means either the unmodified Program or a work based on the Program.
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -1,8 +1,14 @@
## Deepin Tool Kit Core {#mainpage}
## Deepin Tool Kit Core
Deepint Tool Kit (Dtk) is the base development tool of all C++/Qt Developer work on Deepin.
Deepin Tool Kit (DtkCore) is the base development tool of all C++/Qt Developer work on Deepin.
You should read the [Deepin Application Specification](\ref doc/Specification) firstly.
You should read the <a href=docs/Specification.md>Deepin Application Specification</a> firstly.
中文说明:[README.zh_CN.md](./README.zh_CN.md)
## Document
中文文档:[dtkcore文档](https://linuxdeepin.github.io/dtkcore/index.html)
## Dependencies
@ -10,6 +16,15 @@ You should read the [Deepin Application Specification](\ref doc/Specification) f
* Qt >= 5.10
## Compile option
| **Compile option** | **meaning** | **Default state** |
|--------------------|-------------|---------------|
| BUILD_DOCS | Compile document | ON |
| BUILD_TESTING | Compile test | Default is ON in debug mode |
| BUILD_EXAMPLES | Compile example | ON |
| BUILD_WITH_SYSTEMD | Support Systemd function | OFF |
| BUILD_THEME | Add themes to the document | OFF |
## Installation
### Build from source code
@ -18,25 +33,26 @@ You should read the [Deepin Application Specification](\ref doc/Specification) f
2. Build:
````
$ mkdir build
$ cd build
$ qmake ..
$ make
````
```bash
mkdir build
cd build
cmake ..
make
```
3. Install:
````
$ sudo make install
````
```bash
sudo make install
```
## Getting help
Any usage issues can ask for help via
* [Gitter](https://gitter.im/orgs/linuxdeepin/rooms)
* [IRC channel](https://webchat.freenode.net/?channels=deepin)
* [Telegram group](https://t.me/deepin)
* [Matrix](https://matrix.to/#/#deepin-community:matrix.org)
* [IRC (libera.chat)](https://web.libera.chat/#deepin-community)
* [Forum](https://bbs.deepin.org)
* [WiKi](https://wiki.deepin.org/)
@ -44,9 +60,8 @@ Any usage issues can ask for help via
We encourage you to report issues and contribute changes
* [Contribution guide for developers](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers-en). (English)
* [开发者代码贡献指南](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers) (中文)
* [Contribution guide for developers](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers-en).
## License
deepin-tool-kit is licensed under [GPLv3](LICENSE).
deepin-tool-kit is licensed under [LGPL-3.0-or-later](LICENSE).

66
README.zh_CN.md Normal file
View File

@ -0,0 +1,66 @@
## Deepin Tool Kit Core
Deepin Tool Kit Core(DtkCore) 是所有C++/Qt开发人员在Deepin上工作的基础开发工具.
您应该首先阅读 <a href=docs/Specification.md>Deepin应用程序规范</a>.
## 文档
中文文档:[dtkcore文档](https://linuxdeepin.github.io/dtkcore/index.html)
## 依赖
### 编译依赖
* Qt >= 5.10
## 编译选项
| **编译选项** | **含义** | **默认状态** |
|--------------------|-------------|---------------|
| BUILD_DOCS | 编译文档 | ON |
| BUILD_TESTING | 编译测试 | Debug模式下默认为ON |
| BUILD_EXAMPLES | 编译示例 | ON |
| BUILD_WITH_SYSTEMD | 支持Systmed功能 | OFF |
| BUILD_THEME | 为文档添加主题 | OFF |
## 安装
### 从源代码构建
1. 确保已经安装了所有的编译依赖.
2. 构建:
```bash
mkdir build
cd build
cmake ..
make
```
3. 安装:
```bash
sudo make install
```
## 帮助
任何使用问题都可以通过以下方式寻求帮助:
* [Telegram 群组](https://t.me/deepin)
* [Matrix](https://matrix.to/#/#deepin-community:matrix.org)
* [IRC (libera.chat)](https://web.libera.chat/#deepin-community)
* [Forum](https://bbs.deepin.org)
* [WiKi](https://wiki.deepin.org/)
## 参与贡献
我们鼓励您报告问题并作出更改
* [开发者代码贡献指南](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers)
## 协议
DTK工具包遵循协议 [LGPL-3.0-or-later](LICENSE).

1
VERSION Normal file
View File

@ -0,0 +1 @@
5.7.25

1
VERSION.in Normal file
View File

@ -0,0 +1 @@
@version@

View File

@ -1,30 +1,40 @@
# Maintainer: justforlxz <justforlxz@gmail.com>
pkgname=dtkcore-git
pkgver=5.5.23.r5.g74f86b0
pkgver=5.7.25
pkgrel=1
sourcename=dtkcore
sourcetars=("$sourcename"_"$pkgver".tar.xz)
sourcedir="$sourcename"
pkgdesc='DTK core modules'
arch=('x86_64' 'aarch64')
url="https://github.com/linuxdeepin/dtkcore"
license=('LGPL3')
depends=('dconf' 'deepin-desktop-base-git' 'python' 'gsettings-qt' 'lshw')
makedepends=('git' 'qt5-tools' 'gtest' 'dtkcommon-git')
depends=('deepin-desktop-base-git' 'gsettings-qt' 'dtkcommon-git' 'lshw' 'uchardet' 'icu' 'libsystemd' 'spdlog')
makedepends=('git' 'qt5-tools' 'ninja' 'cmake' 'doxygen')
conflicts=('dtkcore')
provides=('dtkcore')
groups=('deepin-git')
source=('source.tar.gz')
source=("${sourcetars[@]}")
sha512sums=('SKIP')
prepare() {
cd $deepin_source_name
}
build() {
cd $deepin_source_name
qmake-qt5 PREFIX=/usr DTK_VERSION=$pkgver LIB_INSTALL_DIR=/usr/lib
make
cd $sourcedir
cmake \
-GNinja \
-DMKSPECS_INSTALL_DIR=lib/qt/mkspecs/modules \
-DBUILD_DOCS=ON \
-DBUILD_WITH_SYSTEMD=ON \
-DBUILD_EXAMPLES=OFF \
-DQCH_INSTALL_DESTINATION=share/doc/qt \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DD_DSG_APP_DATA_FALLBACK=/var/dsg/appdata \
-DBUILD_WITH_SYSTEMD=ON
ninja
}
package() {
cd $deepin_source_name
make INSTALL_ROOT="$pkgdir" install
cd $sourcedir
DESTDIR="$pkgdir" ninja install
}

View File

@ -8,7 +8,7 @@ addDefinitions(Q_HOST_${CMAKE_HOST_SYSTEM_PROCESSOR})
find_package(DtkCore REQUIRED)
set(DEEPIN_OS_RELEASE_TOOL_PATH ${DTKCORE_TOOL_DIR})
set(DEEPIN_OS_RELEASE_TOOL_PATH ${DtkCore_TOOL_DIRS})
set(DEEPIN_OS_RELEASE_TOOL ${DEEPIN_OS_RELEASE_TOOL_PATH}/deepin-os-release)
if(NOT EXISTS "${DEEPIN_OS_RELEASE_TOOL}")

View File

@ -0,0 +1,76 @@
function(addDefinitions macro)
string(TOUPPER ${macro} macro)
add_definitions(-D${macro})
endfunction()
add_definitions(-DQ_HOST_NAME=\"${CMAKE_HOST_SYSTEM_PROCESSOR}\")
addDefinitions(Q_HOST_${CMAKE_HOST_SYSTEM_PROCESSOR})
find_package(Dtk@DTK_VERSION_MAJOR@Core REQUIRED)
set(DEEPIN_OS_RELEASE_TOOL_PATH ${DtkCore_TOOL_DIRS})
set(DEEPIN_OS_RELEASE_TOOL ${DEEPIN_OS_RELEASE_TOOL_PATH}/deepin-os-release)
if(NOT EXISTS "${DEEPIN_OS_RELEASE_TOOL}")
message(FATAL_ERROR "\"${DEEPIN_OS_RELEASE_TOOL}\" is not exists. Install \"dtkcore-bin\" first")
endif()
function(formatString string)
string(REGEX REPLACE "\\s+" "_" string ${string})
endfunction()
macro(execDeepinOsRelease args output)
exec_program(${DEEPIN_OS_RELEASE_TOOL} ARGS ${args} OUTPUT_VARIABLE ${output} RETURN_VALUE exitCode)
if(NOT ${exitCode} EQUAL 0)
message(FATAL_ERROR "exec deepin-os-release failed, with args: ${args}, error message: ${output}")
endif()
endmacro()
execDeepinOsRelease(--deepin-type DEEPIN_OS_TYPE)
execDeepinOsRelease(--deepin-version DEEPIN_OS_VERSION)
execDeepinOsRelease(--product-type CMAKE_PLATFORM_ID)
execDeepinOsRelease(--product-version CMAKE_PLATFORM_VERSION)
if("${CMAKE_PLATFORM_ID}" STREQUAL "")
message(WARNING "No value of the \"--product-type\" in the process \"${DEEPIN_OS_RELEASE_TOOL}\"")
else()
formatString(CMAKE_PLATFORM_ID)
message("OS: ${CMAKE_PLATFORM_ID}, Version: ${CMAKE_PLATFORM_VERSION}")
if(NOT "${CMAKE_PLATFORM_ID}" STREQUAL "")
addDefinitions(Q_OS_${CMAKE_PLATFORM_ID})
string(TOUPPER ${CMAKE_PLATFORM_ID} CMAKE_PLATFORM_ID)
set(OS_${CMAKE_PLATFORM_ID} TRUE)
endif()
formatString(CMAKE_PLATFORM_VERSION)
add_definitions(-DQ_OS_VERSION=\"${CMAKE_PLATFORM_VERSION}\")
#uos base with deepin
if("${CMAKE_PLATFORM_ID}" STREQUAL "UOS")
addDefinitions(Q_OS_DEEPIN)
set(OS_DEEPIN TRUE)
endif()
endif()
if("${DEEPIN_OS_TYPE}" STREQUAL "")
message(WARNING "No value of the \"--deepin-type\" in the process \"${DEEPIN_OS_RELEASE_TOOL}\"")
else()
formatString(DEEPIN_OS_TYPE)
message("Deepin OS Type: ${DEEPIN_OS_TYPE}")
message("Deepin OS Version: ${DEEPIN_OS_VERSION}")
if(NOT "${DEEPIN_OS_TYPE}" STREQUAL "")
addDefinitions(Q_OS_DEEPIN_${DEEPIN_OS_TYPE})
addDefinitions(DEEPIN_DDE)
string(TOUPPER ${DEEPIN_OS_TYPE} DEEPIN_OS_TYPE)
set(OS_DEEPIN_${DEEPIN_OS_TYPE} TRUE)
set(DEEPIN_DDE TRUE)
endif()
formatString(DEEPIN_OS_VERSION)
add_definitions(-DQ_OS_DEEPIN_VERSION=\"${DEEPIN_OS_VERSION}\")
endif()

View File

@ -0,0 +1,101 @@
# SPDX-FileCopyrightText: 2022 - 2023 Uniontech Software Technology Co.,Ltd.
#
# SPDX-License-Identifier: LGPL-3.0-or-later
# This cmake file is used to deploy files that dconfig's meta and override configure.
include(CMakeParseArguments)
# get subpath according `FILE` and `BASE`.
# e.g: FILE = /a/b/c/d/foo.json, BASE = /a/b, then return SUBPATH = /c/d/
function(get_subpath FILE BASE SUBPATH)
get_filename_component(BASE_FILE_PATH ${BASE} REALPATH)
get_filename_component(FILE_PATH ${FILE} REALPATH)
string(REPLACE ${BASE_FILE_PATH} "" SUBPATH_FILE_NAME ${FILE_PATH})
get_filename_component(SUBPATH_PATH ${SUBPATH_FILE_NAME} DIRECTORY)
set(${SUBPATH} ${SUBPATH_PATH} PARENT_SCOPE)
endfunction()
if(NOT DEFINED DSG_DATA_DIR)
set(DSG_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/dsg)
endif()
add_definitions(-DDSG_DATA_DIR=\"${DSG_DATA_DIR}\")
# deploy some `meta` 's configure.
#
# FILES - deployed files.
# BASE - used to get subpath, if it's empty, only copy files, and ignore it's subpath structure.
# APPID - working for the app.
# COMMONID - working for common.
#
# e.g:
# dtk_add_config_meta_files(APPID dconfigexample BASE ./configs FILES ./configs/example.json ./configs/a/example.json)
#
function(dtk_add_config_meta_files)
set(oneValueArgs BASE APPID COMMONID)
set(multiValueArgs FILES)
cmake_parse_arguments(METAITEM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
foreach(_current_FILE ${METAITEM_FILES})
set(SUBPATH "")
if (DEFINED METAITEM_BASE)
GET_SUBPATH(${_current_FILE} ${METAITEM_BASE} SUBPATH)
endif()
if (DEFINED METAITEM_APPID)
install(FILES "${_current_FILE}" DESTINATION ${DSG_DATA_DIR}/configs/${METAITEM_APPID}/${SUBPATH})
elseif (DEFINED METAITEM_COMMONID)
install(FILES ${_current_FILE} DESTINATION ${DSG_DATA_DIR}/configs/${SUBPATH})
else()
message(FATAL_ERROR "Please set APPID or COMMONID for the meta item." ${_current_FILE})
endif()
endforeach()
endfunction()
# deploy some `meta` 's override configure.
#
# configuration for the `meta_name` 's override configure.
#
# FILES - deployed files.
# BASE - used to get subpath, if it's empty, only copy files, and ignore it's subpath structure.
# APPID - working for the app, if it's empty, working for all app.
# META_NAME - override for the meta configure.
#
# e.g :
#dtk_add_config_override_files(APPID dconfigexample BASE ./configs META_NAME example FILES ./configs/dconf-example.override.json ./configs/a/dconf-example.override.a.json)
#
function(dtk_add_config_override_files)
set(options)
set(oneValueArgs BASE APPID META_NAME)
set(multiValueArgs FILES)
cmake_parse_arguments(OVERRIDEITEM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if (NOT DEFINED OVERRIDEITEM_META_NAME)
message(FATAL_ERROR "Please set meta_name for the override configuration." ${FILES})
endif()
foreach(_current_FILE ${OVERRIDEITEM_FILES})
set(SUBPATH "")
if (DEFINED OVERRIDEITEM_BASE)
GET_SUBPATH(${_current_FILE} ${OVERRIDEITEM_BASE} SUBPATH)
endif()
if (DEFINED OVERRIDEITEM_APPID)
install(FILES "${_current_FILE}" DESTINATION ${DSG_DATA_DIR}/configs/overrides/${OVERRIDEITEM_APPID}/${OVERRIDEITEM_META_NAME}/${SUBPATH})
else()
install(FILES "${_current_FILE}" DESTINATION ${DSG_DATA_DIR}/configs/overrides/${OVERRIDEITEM_META_NAME}/${SUBPATH})
endif()
endforeach()
endfunction()
# deprecated since dtk6
function(dconfig_meta_files)
dtk_add_config_meta_files(${ARGV})
endfunction()
function(dconfig_override_files)
dtk_add_config_override_files(${ARGV})
endfunction()

View File

@ -0,0 +1,95 @@
# SPDX-FileCopyrightText: 2022 - 2023 Uniontech Software Technology Co.,Ltd.
#
# SPDX-License-Identifier: LGPL-3.0-or-later
# This cmake file is used to deploy files that dconfig's meta and override configure.
include(CMakeParseArguments)
# get subpath according `FILE` and `BASE`.
# e.g: FILE = /a/b/c/d/foo.json, BASE = /a/b, then return SUBPATH = /c/d/
function(get_subpath FILE BASE SUBPATH)
get_filename_component(BASE_FILE_PATH ${BASE} REALPATH)
get_filename_component(FILE_PATH ${FILE} REALPATH)
string(REPLACE ${BASE_FILE_PATH} "" SUBPATH_FILE_NAME ${FILE_PATH})
get_filename_component(SUBPATH_PATH ${SUBPATH_FILE_NAME} DIRECTORY)
set(${SUBPATH} ${SUBPATH_PATH} PARENT_SCOPE)
endfunction()
if(NOT DEFINED DSG_DATA_DIR)
set(DSG_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/dsg)
endif()
add_definitions(-DDSG_DATA_DIR=\"${DSG_DATA_DIR}\")
# deploy some `meta` 's configure.
#
# FILES - deployed files.
# BASE - used to get subpath, if it's empty, only copy files, and ignore it's subpath structure.
# APPID - working for the app.
# COMMONID - working for common.
#
# e.g:
# dtk_add_config_meta_files(APPID dconfigexample BASE ./configs FILES ./configs/example.json ./configs/a/example.json)
#
function(dtk_add_config_meta_files)
set(oneValueArgs BASE APPID COMMONID)
set(multiValueArgs FILES)
cmake_parse_arguments(METAITEM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
foreach(_current_FILE ${METAITEM_FILES})
set(SUBPATH "")
if (DEFINED METAITEM_BASE)
GET_SUBPATH(${_current_FILE} ${METAITEM_BASE} SUBPATH)
endif()
if (DEFINED METAITEM_APPID)
install(FILES "${_current_FILE}" DESTINATION ${DSG_DATA_DIR}/configs/${METAITEM_APPID}/${SUBPATH})
elseif (DEFINED METAITEM_COMMONID)
install(FILES ${_current_FILE} DESTINATION ${DSG_DATA_DIR}/configs/${SUBPATH})
else()
message(FATAL_ERROR "Please set APPID or COMMONID for the meta item." ${_current_FILE})
endif()
endforeach()
endfunction()
# deploy some `meta` 's override configure.
#
# configuration for the `meta_name` 's override configure.
#
# FILES - deployed files.
# BASE - used to get subpath, if it's empty, only copy files, and ignore it's subpath structure.
# APPID - working for the app, if it's empty, working for all app.
# META_NAME - override for the meta configure.
#
# e.g :
#dtk_add_config_override_files(APPID dconfigexample BASE ./configs META_NAME example FILES ./configs/dconf-example.override.json ./configs/a/dconf-example.override.a.json)
#
function(dtk_add_config_override_files)
set(options)
set(oneValueArgs BASE APPID META_NAME)
set(multiValueArgs FILES)
cmake_parse_arguments(OVERRIDEITEM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if (NOT DEFINED OVERRIDEITEM_META_NAME)
message(FATAL_ERROR "Please set meta_name for the override configuration." ${FILES})
endif()
foreach(_current_FILE ${OVERRIDEITEM_FILES})
set(SUBPATH "")
if (DEFINED OVERRIDEITEM_BASE)
GET_SUBPATH(${_current_FILE} ${OVERRIDEITEM_BASE} SUBPATH)
endif()
if (DEFINED OVERRIDEITEM_APPID)
install(FILES "${_current_FILE}" DESTINATION ${DSG_DATA_DIR}/configs/overrides/${OVERRIDEITEM_APPID}/${OVERRIDEITEM_META_NAME}/${SUBPATH})
else()
install(FILES "${_current_FILE}" DESTINATION ${DSG_DATA_DIR}/configs/overrides/${OVERRIDEITEM_META_NAME}/${SUBPATH})
endif()
endforeach()
endfunction()
@DCONFIG_DEPRECATED_FUNCS@

View File

@ -0,0 +1,79 @@
# Copyright 2005-2011 Kitware, Inc.
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
include(MacroAddFileDependencies)
include(CMakeParseArguments)
function(dtk_add_dbus_interface _sources _interface _relativename)
get_filename_component(_infile ${_interface} ABSOLUTE)
get_filename_component(_basepath ${_relativename} DIRECTORY)
get_filename_component(_basename ${_relativename} NAME)
set(_header "${CMAKE_CURRENT_BINARY_DIR}/${_relativename}.h")
set(_impl "${CMAKE_CURRENT_BINARY_DIR}/${_relativename}.cpp")
if(${QT_VERSION_MAJOR} EQUAL "5")
if(_basepath)
set(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_basename}.moc")
else()
set(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc")
endif()
else()
if(_basepath)
set(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/moc_${_basename}.cpp")
else()
set(_moc "${CMAKE_CURRENT_BINARY_DIR}/moc_${_basename}.cpp")
endif()
endif()
get_source_file_property(_nonamespace ${_interface} NO_NAMESPACE)
if(_nonamespace)
set(_params -N -m)
else()
set(_params -m)
endif()
get_source_file_property(_skipincludeannotations ${_interface} SKIP_INCLUDE_ANNOTATIONS)
if(_skipincludeannotations)
set(_params ${_params} -S)
endif()
get_source_file_property(_classname ${_interface} CLASSNAME)
if(_classname)
set(_params ${_params} -c ${_classname})
endif()
get_source_file_property(_include ${_interface} INCLUDE)
if(_include)
set(_params ${_params} -i ${_include})
endif()
add_custom_command(OUTPUT "${_impl}" "${_header}"
COMMAND ${DTK_XML2CPP} ${_params} -p ${_relativename} ${_infile}
DEPENDS ${_infile} ${DTK_XML2CPP}
VERBATIM
)
set_source_files_properties("${_impl}" "${_header}" PROPERTIES
SKIP_AUTOMOC TRUE
SKIP_AUTOUIC TRUE
)
qt_generate_moc("${_header}" "${_moc}")
list(APPEND ${_sources} "${_impl}" "${_header}")
set_property(SOURCE "${_impl}" APPEND PROPERTY OBJECT_DEPENDS "${_moc}")
set(${_sources} ${${_sources}} PARENT_SCOPE)
endfunction()
function(dtk_add_dbus_interfaces _sources)
foreach(_current_FILE ${ARGN})
get_filename_component(_infile ${_current_FILE} ABSOLUTE)
get_filename_component(_basename ${_current_FILE} NAME)
# get the part before the ".xml" suffix
string(TOLOWER ${_basename} _basename)
string(REGEX REPLACE "(.*\\.)?([^\\.]+)\\.xml" "\\2" _basename ${_basename})
dtk_add_dbus_interface(${_sources} ${_infile} ${_basename}interface)
endforeach()
set(${_sources} ${${_sources}} PARENT_SCOPE)
endfunction()

View File

@ -0,0 +1,47 @@
# SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
# SPDX-License-Identifier: LGPL-3.0-or-later
include(MacroAddFileDependencies)
include(CMakeParseArguments)
# Define the helper function
function(dtk_add_config_to_cpp OUTPUT_VAR JSON_FILE)
if(NOT EXISTS ${JSON_FILE})
message(FATAL_ERROR "JSON file ${JSON_FILE} does not exist.")
endif()
cmake_parse_arguments(
"arg"
""
"OUTPUT_FILE_NAME;CLASS_NAME"
""
${ARGN}
)
# Generate the output header file name
get_filename_component(FILE_NAME_WLE ${JSON_FILE} NAME_WLE)
if(DEFINED arg_OUTPUT_FILE_NAME)
set(OUTPUT_HEADER "${CMAKE_CURRENT_BINARY_DIR}/${arg_OUTPUT_FILE_NAME}")
else()
set(OUTPUT_HEADER "${CMAKE_CURRENT_BINARY_DIR}/dconfig_${FILE_NAME_WLE}.hpp")
endif()
# Check if CLASS_NAME is set
if(DEFINED arg_CLASS_NAME)
set(CLASS_NAME_ARG -c ${arg_CLASS_NAME})
else()
set(CLASS_NAME_ARG "")
endif()
# Add a custom command to run dconfig2cpp
add_custom_command(
OUTPUT ${OUTPUT_HEADER}
COMMAND ${DTK_DCONFIG2CPP} -o ${OUTPUT_HEADER} ${CLASS_NAME_ARG} ${JSON_FILE}
DEPENDS ${JSON_FILE} ${DTK_XML2CPP}
COMMENT "Generating ${OUTPUT_HEADER} from ${JSON_FILE}"
VERBATIM
)
# Add the generated header to the specified output variable
set(${OUTPUT_VAR} ${${OUTPUT_VAR}} ${OUTPUT_HEADER} PARENT_SCOPE)
endfunction()

View File

@ -32,12 +32,12 @@
#=============================================================================
function(DTK_CREATE_I18N_FROM_JSON _generated_file_list _input_json_file _output_cpp_file_name)
set (generated_file_list) # 0(failed) or 1(successed) files in the list.
set (generated_file_list) # 0(failed) or 1(succeeded) files in the list.
get_filename_component(_input_json_abs_path ${_input_json_file} ABSOLUTE)
get_filename_component(_input_json_abs_dir ${_input_json_abs_path} DIRECTORY)
set (_output_cpp_abs_path ${_input_json_abs_dir}/${_output_cpp_file_name})
if (DTK_SETTINGS_TOOLS_FOUND)
add_custom_command(OUTPUT ${_output_cpp_abs_path}
COMMAND ${DTK_SETTINGS_TOOLS_EXECUTABLE}
@ -46,7 +46,7 @@ function(DTK_CREATE_I18N_FROM_JSON _generated_file_list _input_json_file _output
list(APPEND generated_file_list ${_output_cpp_abs_path})
else ()
message (WARNING "The dtk-settings tools could not be found at ${DTK_SETTINGS_TOOLS_EXECUTABLE}")
message (WARNING "Package distributor may create a seprated package for tools like `libdtkcore-bin`.")
message (WARNING "Package distributor may create a separated package for tools like `libdtkcore-bin`.")
endif ()
set(${_generated_file_list} ${generated_file_list} PARENT_SCOPE)

View File

@ -1,9 +0,0 @@
find_package(DtkCore REQUIRED)
set (DTK_SETTINGS_TOOLS_EXECUTABLE ${DTKCORE_TOOL_DIR}/dtk-settings)
if (EXISTS ${DTK_SETTINGS_TOOLS_EXECUTABLE})
set(DTK_SETTINGS_TOOLS_FOUND TRUE)
endif ()
include("${CMAKE_CURRENT_LIST_DIR}/DtkSettingsToolsMacros.cmake")

View File

@ -0,0 +1,16 @@
include(CMakeFindDependencyMacro)
find_dependency(Dtk@DTK_VERSION_MAJOR@Core REQUIRED)
set (DTK_SETTINGS_TOOLS_EXECUTABLE ${DtkCore_TOOL_DIRS}/dtk-settings)
if (EXISTS ${DTK_SETTINGS_TOOLS_EXECUTABLE})
set(DTK_SETTINGS_TOOLS_FOUND TRUE)
endif ()
include("${CMAKE_CURRENT_LIST_DIR}/Dtk@DTK_VERSION_MAJOR@SettingsToolsMacros.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/Dtk@DTK_VERSION_MAJOR@ToolsTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/DtkDBusMacros.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/DtkDConfigMacros.cmake")
get_target_property(DTK_XML2CPP Dtk@DTK_VERSION_MAJOR@::Xml2Cpp LOCATION)
get_target_property(DTK_DCONFIG2CPP Dtk@DTK_VERSION_MAJOR@::DConfig2Cpp LOCATION)

View File

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
#
# SPDX-License-Identifier: LGPL-3.0-or-later
from conans import ConanFile, tools

450
debian/changelog vendored
View File

@ -1,8 +1,450 @@
dtkcore (5.5.35) unstable; urgency=medium
dtkcore (5.7.25) unstable; urgency=medium
* Release 5.5.35
* Release 5.7.25
-- Deepin Packages Builder <packages@deepin.com> Thu, 24 Nov 2022 13:28:15 +0800
-- yeshanshan <yeshanshan@uniontech.com> Thu, 30 Oct 2025 21:47:32 +0800
dtkcore (5.7.24) unstable; urgency=medium
* Release 5.7.24
-- yeshanshan <yeshanshan@uniontech.com> Thu, 16 Oct 2025 19:45:57 +0800
dtkcore (5.7.23) unstable; urgency=medium
* Release 5.7.23
-- yeshanshan <packages@deepin.org> Thu, 25 Sep 2025 16:49:58 +0800
dtkcore (5.7.22) unstable; urgency=medium
* Release 5.7.22
-- yeshanshan <yeshanshan@uniontech.com> Thu, 04 Sep 2025 19:27:28 +0800
dtkcore (5.7.21) unstable; urgency=medium
* Release 5.7.21
-- yeshanshan <packages@deepin.org> Thu, 14 Aug 2025 19:47:41 +0800
dtkcore (5.7.20) unstable; urgency=medium
* Release 5.7.20
-- yeshanshan <yeshanshan@uniontech.com> Thu, 31 Jul 2025 20:00:27 +0800
dtkcore (5.7.19) unstable; urgency=medium
* Release 5.7.19
-- yeshanshan <yeshanshan@uniontech.com> Thu, 03 Jul 2025 21:11:07 +0800
dtkcore (5.7.18) unstable; urgency=medium
* Release 5.7.18
-- yeshanshan <yeshanshan@uniontech.com> Fri, 27 Jun 2025 17:07:16 +0800
dtkcore (5.7.17) unstable; urgency=medium
* Release 5.7.17
-- asterwyx <wangyixue@uniontech.com> Wed, 18 Jun 2025 18:01:08 +0800
dtkcore (5.7.16) unstable; urgency=medium
* fix: add missing UosMilitary edition type cases
-- YeShanShan <yeshanshan@uniontech.com> Mon, 19 May 2025 17:21:50 +0800
dtkcore (5.7.15) unstable; urgency=medium
* fix: correct bitwise operation in dconfig status tracking
* chore: update REUSE license file patterns
* fix: add QPointer check for parent object safety
-- YeShanShan <yeshanshan@uniontech.com> Thu, 08 May 2025 17:53:02 +0800
dtkcore (5.7.14) unstable; urgency=medium
* fix: resolve compilation failure on Qt 6.9
-- JiDe Zhang <zhangjide@deepin.org> Sat, 12 Apr 2025 17:19:00 +0800
dtkcore (5.7.13) unstable; urgency=medium
* fix: add copyright for dconfig_org_deepin_dtk_preference.hpp
* feat: supports create generic config by dconfig2cpp
* fix: build failed on Qt6
-- YeShanShan <yeshanshan@uniontech.com> Thu, 20 Mar 2025 17:05:39 +0800
dtkcore (5.7.12) unstable; urgency=medium
* feat: dconfig2cpp always add bindableFoo functions on Qt6
* feat: Add files generated by qdbusXML2cpp and DCONG2cpp
-- YeShanShan <yeshanshan@uniontech.com> Thu, 06 Mar 2025 17:29:21 +0800
dtkcore (5.7.11) unstable; urgency=medium
* feat: dconfig2cpp generated codes supports qml
* feat: export ProductType for QML
* feat: async get dconfig value for DLog
* feat: support auto generate the Qt code from a dconfig's json
-- YeShanShan <yeshanshan@uniontech.com> Thu, 27 Feb 2025 20:47:22 +0800
dtkcore (5.7.10) unstable; urgency=medium
* Release 5.7.10
-- YeShanShan <yeshanshan@uniontech.com> Thu, 13 Feb 2025 17:18:04 +0800
dtkcore (5.7.9) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder <packages@deepin.org> Thu, 23 Jan 2025 09:07:08 +0000
dtkcore (5.7.8) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder <packages@deepin.org> Tue, 14 Jan 2025 11:17:31 +0000
dtkcore (5.7.7) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder <packages@deepin.org> Thu, 09 Jan 2025 09:28:38 +0000
dtkcore (5.7.6) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder <packages@deepin.org> Thu, 02 Jan 2025 05:43:52 +0000
dtkcore (5.7.5) unstable; urgency=medium
* fix: pidfd leak
-- Deepin Packages Builder <packages@deepin.org> Thu, 12 Dec 2024 03:03:54 +0000
dtkcore (5.7.4) unstable; urgency=medium
* fix: hasVtable is incorrect when destructing
-- Deepin Packages Builder <packages@deepin.org> Tue, 03 Dec 2024 02:00:45 +0000
dtkcore (5.7.3) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder <packages@deepin.org> Wed, 20 Nov 2024 02:19:06 +0000
dtkcore (5.7.2) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder <packages@deepin.org> Wed, 13 Nov 2024 01:53:26 +0000
dtkcore (5.7.1) unstable; urgency=medium
* feat: 增加智能终端设备类型 (#434)
Thanks to Whale107
* fix: remove unnecessary link libraries
* fix: DDBusInterface signal loss
* fix(util): error appid from `getAppIdFromAbsolutePath`
-- Deepin Packages Builder <packages@deepin.org> Wed, 16 Oct 2024 03:30:45 +0000
dtkcore (5.6.34) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder <packages@deepin.org> Tue, 20 Aug 2024 05:03:51 +0000
dtkcore (5.6.32) unstable; urgency=medium
* refactor: log files move to dtklog(Issue: #182)
-- Deepin Packages Builder <packages@deepin.org> Mon, 08 Jul 2024 02:29:21 +0000
dtkcore (5.6.31) unstable; urgency=medium
* chore: use '&&' and '||' instead of 'and' and 'or'
-- Deepin Packages Builder <packages@deepin.org> Thu, 27 Jun 2024 09:11:34 +0000
dtkcore (5.6.30) unstable; urgency=medium
* feat: 允许基于dtk开发的应用动态控制其日志输出等级(Task: 307567)(Influence: 允许基于dtk开发的应用动态控制其日志输出等级)
* fix: lshw查询内存大小时返回多元素数组,修正解析过程(Bug: 228681)(Influence: DSysInfo::memoryInstalledSize解析过程)
* fix: 从文件中读取deepinType和productType值时因为权限问题会失败(Influence: 正常显示版本和说明)
* feat: 增加registerLoggingRulesWatcher接口(Task: 303379)
* fix: 修复计算 build 版本号错误的问题(Influence: 构建版本号BUILD_VERSION )
* feat: DeepinType类型增加军用版(Task: 316703)(Influence: DeepinType类型)
* fix: 修复日志格式时间戳显示异常问题(Bug: 236239)(Influence: 使用DLogManager的应用日志输出格式)
* chore: loggingrules config move to preference
* refactor: remove LoggingRules interface
* fix: crashed when access DSGApplication::id early
* chore: fallback to dsgconfig value
* fix(build): build faild on Qt 6.7.1
-- Deepin Packages Builder <packages@deepin.org> Thu, 30 May 2024 02:46:32 +0000
dtkcore (5.6.29) unstable; urgency=medium
* chore: remove warning for dbusxml2cpp in qt6
-- Deepin Packages Builder <packages@deepin.org> Mon, 13 May 2024 03:02:53 +0000
dtkcore (5.6.28) unstable; urgency=medium
* fix: fix undefined reference errors on spdlog 1.14.0
Thanks to hillwoodroc
-- Deepin Packages Builder <packages@deepin.org> Mon, 29 Apr 2024 08:23:39 +0000
dtkcore (5.6.27) unstable; urgency=medium
* fix: lossing value when save DConfig
* fix(qdbusxml2cpp): support qt 6.7
-- Deepin Packages Builder <packages@deepin.org> Fri, 19 Apr 2024 08:55:35 +0000
dtkcore (5.6.26) unstable; urgency=medium
[ root ]
* UNRELEASED
-- Deepin Packages Builder <packages@deepin.org> Tue, 26 Mar 2024 05:47:35 +0000
dtkcore (5.6.25) unstable; urgency=medium
* chore: fix docs typo
* feat: support to set appId for DConfig
* fix: DConfig add check for name(Issue: #1211374)
-- Deepin Packages Builder <packages@deepin.org> Mon, 11 Mar 2024 01:16:26 +0000
dtkcore (5.6.22) unstable; urgency=medium
* Release 5.6.22
-- Deepin Packages Builder <packages@deepin.org> Wed, 10 Jan 2024 02:30:59 +0000
dtkcore (5.6.21) unstable; urgency=medium
* fix: app blocked when AM is unavailable
* chore: remove decltype(auto) for dutil
* chore: fix relative path invalid link
* feat: allow skip including headers of annotations(Issue: #147)
-- Deepin Packages Builder <packages@deepin.org> Tue, 09 Jan 2024 01:45:43 +0000
dtkcore (5.6.20) unstable; urgency=medium
* feat: add utils function
* chore: Implement DSGApplication::getId
* feat(dstandardpaths): add XDG_STATE_HOME
* chore: keep order when deduplication
* fix: log files limit not work
* chore: add dtk dbus generate function
-- Deepin Packages Builder <packages@deepin.org> Tue, 28 Nov 2023 05:40:53 +0000
dtkcore (5.6.19) unstable; urgency=medium
* fix: Type error for qdbusxml2cpp
* fix: correct Dtk6SettingsToolsMacros.cmake path
* chore: add flag UserPublic(Issue: https://github.com/linuxdeepin/developer-center/issues/5928)
-- Deepin Packages Builder <packages@deepin.org> Mon, 23 Oct 2023 07:33:19 +0000
dtkcore (5.6.18) unstable; urgency=medium
* fix: Can't clear cache when reset for DConfig in FileBackend
* feat: Add isDefaultValue for DConfig(Issue: #3)
* fix: Compiling failed in lower libspdlog-dev
* fix: missing parameter passing for synchronization
* fix(build): skip failed unit test
* chore(tools): show help if argc < 2
* fix: Compiling failed in libspdlog-dev before 1.4.0
Thanks to Shiroko
* fix: cmake failure when env is null
* chore: correct typos in DtkSettingsToolsMacros.cmake
Thanks to Felix Yan
* chore: dpinyin tweak(Issue: #109)
-- Deepin Packages Builder <packages@deepin.org> Wed, 18 Oct 2023 06:01:45 +0000
dtkcore (5.6.17) unstable; urgency=medium
* Release 5.6.17
-- Deepin Packages Builder <packages@deepin.org> Fri, 08 Sep 2023 15:12:36 +0800
dtkcore (5.6.16) unstable; urgency=medium
* fix: FileAppender log level not set
* chore: ut linked dtkcore instead of source code
* chore: tweak CMakeLists
* chore: support Qt 6.4 build
* chore: qch docs tweak
* chore: add DtkBuildHelper depends
* chore: console with color at tty
* fix: missing dependency qttools5-dev
* feat: add synchronization workflow
-- Deepin Packages Builder <packages@deepin.org> Tue, 22 Aug 2023 06:13:45 +0000
dtkcore (5.6.15) unstable; urgency=medium
* chore: dlog example tweak
-- Yixue Wang <wangyixue@deepin.org> Fri, 11 Aug 2023 13:42:20 +0800
dtkcore (5.6.14) unstable; urgency=medium
* chore: function need to be marked as override
* chore: ignore doxygen-theme folder
Thanks to Skye-rs
* chore: change OUTPUT_DIR variable in cmake
* chore: remove unused pro files
* refactor!: deprecate some interfaces in dtk6
* fix: updateProp cannot convert to property type
* fix: typo in xdg
* chore: reduce compilation warnings
Thanks to SPUER(Issue: #96)
* chore(dcapmanager): RuntimeTime -> RuntimeDir
* chore: Sync by https://github.com/linuxdeepin/.github/commit/559e91167d4919644f37bbcf123eb0651c1528ea(Influence: none)
* chore: make test-recoverage.sh runable again
* chore: add ut for DDbusSender
* feat: add systembus send support
* fix: internalPropSet nerver emit propertyChanged
* chore: should include QVector headers
* chore: dsysinfo tweak
* chore: add some unit test
-- Deepin Packages Builder <packages@deepin.org> Thu, 27 Jul 2023 06:56:33 +0000
dtkcore (5.6.13) unstable; urgency=medium
* feat: DConfig add check for no existed item when override
* fix(cmake): wrong use of option and wrong macro
* fix: calling delay in DDBusSender(Issue: https://github.com/linuxdeepin/developer-center/issues/4415)
* feat: DConfig add check for subpath(Issue: #54)
* feat: DConfig exports metadir's implementation(Issue: #10)
* fix(dccinterface): fix cannot get the right type
* fix: DConfig's `subpathIsValid` produces error
* fix(ut): failed ut
* fix(build): build faild on Qt6
* fix: fix build failed due to gcc compiler bug
* fix: ut_dfilewater failed on Qt6
* fix: DTextEncoding ut failed in Qt6.
* fix: fix DTextEncoding warnings.
* feat: support dtk6core build
* feat: add DThreadUtils class
* fix: move Qt CorePrivate to target private link
* fix: qdbusxml2cpp-fix not in path
* chore: remove ddbusinterface property cache
* chore: remove libdtkcommon depends
-- Deepin Packages Builder <packages@deepin.org> Sun, 25 Jun 2023 14:40:49 +0800
dtkcore (5.6.12) unstable; urgency=medium
* Release 5.6.12
* add DLicenseInfo
* cached memoryInstalledSize
* FIX developer-center#4348
-- Deepin Packages Builder <packages@deepin.com> Mon, 15 May 2023 11:18:15 +0800
dtkcore (5.6.11) unstable; urgency=medium
* Release 5.6.11
* add color to ConsoleAppender
* remove build warning
-- Deepin Packages Builder <packages@deepin.com> Mon, 08 May 2023 11:48:45 +0800
dtkcore (5.6.10) unstable; urgency=medium
* Release 5.6.10
* support XDG_SESSION_DESKTOP set to DDE
-- Deepin Packages Builder <packages@deepin.com> Mon, 17 Apr 2023 17:08:28 +0800
dtkcore (5.6.9) unstable; urgency=medium
* Release 5.6.9
-- Deepin Packages Builder <packages@deepin.com> Mon, 03 Apr 2023 09:48:07 +0800
dtkcore (5.6.8) unstable; urgency=medium
* Release 5.6.8
-- Deepin Packages Builder <packages@deepin.com> Wed, 22 Feb 2023 14:09:56 +0800
dtkcore (5.6.6) unstable; urgency=medium
* Release 5.6.6
-- Deepin Packages Builder <packages@deepin.com> Tue, 21 Feb 2023 12:25:24 +0800
dtkcore (5.6.5) unstable; urgency=medium
* Release 5.6.5
-- Deepin Packages Builder <packages@deepin.com> Thu, 02 Feb 2023 14:25:36 +0800
dtkcore (5.6.4) unstable; urgency=medium
* Release 5.6.4
-- Deepin Packages Builder <packages@deepin.com> Fri, 06 Jan 2023 16:30:40 +0800
dtkcore (5.6.3) unstable; urgency=medium
* Release 5.6.3
-- Deepin Packages Builder <packages@deepin.com> Mon, 12 Dec 2022 14:40:31 +0800
dtkcore (5.6.2.2) unstable; urgency=medium
* release 5.6.2.2
-- Deepin Packages Builder <packages@deepin.com> Thu, 17 Nov 2022 17:41:10 +0800
dtkcore (5.6.2.1) unstable; urgency=medium
* snipe release 5.6.2.1
-- Deepin Packages Builder <packages@deepin.com> Mon, 31 Oct 2022 16:53:16 +0800
dtkcore (5.6.2) unstable; urgency=medium
* snipe release 5.6.2
-- Deepin Packages Builder <packages@deepin.com> Wed, 21 Sep 2022 13:57:29 +0800
dtkcore (5.6.0) unstable; urgency=medium
* snipe release 5.6.0
-- Deepin Packages Builder <packages@deepin.com> Mon, 11 Jul 2022 17:47:56 +0800
dtkcore (5.0.3) unstable; urgency=medium
@ -24,6 +466,6 @@ dtkcore (2.0.8) unstable; urgency=medium
dtkcore (0.3.3-1) unstable; urgency=medium
* Initial release
* Initial release
-- Deepin Packages Builder <packages@deepin.com> Mon, 10 Oct 2016 16:58:07 +0800

1
debian/compat vendored
View File

@ -1 +0,0 @@
9

19
debian/control vendored
View File

@ -2,14 +2,15 @@ Source: dtkcore
Section: libdevel
Priority: optional
Maintainer: Deepin Packages Builder <packages@deepin.com>
Build-Depends: debhelper (>= 9), pkg-config,
qttools5-dev-tools, qtbase5-private-dev,
libgsettings-qt-dev, libgtest-dev, libdtkcommon-dev
Build-Depends: debhelper-compat ( =12), pkg-config,
qttools5-dev-tools, qttools5-dev, qtbase5-private-dev, doxygen,
libgsettings-qt-dev, libgtest-dev, libdtkcommon-dev, cmake,
libuchardet-dev, libicu-dev, libdtklog-dev, libdbus-1-dev
Standards-Version: 3.9.8
Package: libdtkcore5
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, lshw, libdtkcommon
Depends: ${shlibs:Depends}, ${misc:Depends}, lshw
Multi-Arch: same
Description: Deepin Tool Kit Core library
DtkCore is base library of Deepin Qt/C++ applications.
@ -27,8 +28,16 @@ Description: Deepin Tool Kit Core Utilities
Package: libdtkcore-dev
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libdtkcore5( =${binary:Version}), libdtkcommon-dev
Depends: ${shlibs:Depends}, ${misc:Depends}, libdtkcore5( =${binary:Version}),
libdtkcommon-dev(>=5.6.16), libdtklog-dev
Description: Deepin Tool Kit Core Devel library
DtkCore is base devel library of Deepin Qt/C++ applications.
.
This package contains the header files and static libraries of DtkCore
Package: libdtkcore-doc
Architecture: any
Description: Deepin Tool Kit Core (document)
DtkCore is base devel library of Deepin Qt/C++ applications.
.
This package contains the doc files of DtkCore

1
debian/libdtkcore-doc.install vendored Normal file
View File

@ -0,0 +1 @@
usr/share/qt5/doc/dtkcore.qch

View File

@ -1,2 +1 @@
usr/lib/*/*/DCore/bin/*
usr/bin/*
usr/*/*/DCore/bin/*

25
debian/rules vendored
View File

@ -2,23 +2,32 @@
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
export QT_SELECT = qt5
export DEB_CXXFLAGS_MAINT_APPEND = -Ofast
# 安全编译参数
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall
export DEB_CXXFLAGS_MAINT_APPEND = -Wall
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-E
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
VERSION = $(DEB_VERSION_UPSTREAM)
_PACK_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$1}')
_BUILD_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$2}' | sed 's/[^0-9]//g')
ifeq ($(_BUILD_VER),)
CONFIG_VERSION = $(_PACK_VER)
else
CONFIG_VERSION = $(_PACK_VER).$(_BUILD_VER)
# Calculate build version:
# 5.6.8 -> 0; 5.6.8.7 -> 7; 5.6.8+u001 -> 1; 5.6.8.7+u001 -> 7; 5.6.8.0+u001 -> 0
BUILD_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$1}' | awk -F'.' '{print $$4}' | sed 's/[^0-9]//g' | awk '{print int($$1)}')
ifeq ($(BUILD_VER), 0)
ifeq ($(shell expr $(shell echo "$(VERSION)" | awk -F. '{print NF-1}') '<' 3), 1)
BUILD_VER=$(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$2}' | sed 's/[^0-9]//g' | awk '{print int($$1)}')
endif
endif
%:
dh $@ --buildsystem=qmake --parallel
dh $@
override_dh_auto_configure:
dh_auto_configure -- LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) VERSION=$(CONFIG_VERSION)
dh_auto_configure -- -DBUILD_WITH_SYSTEMD=ON -DBUILD_EXAMPLES=OFF -DBUILD_DOCS=ON -DBUILD_VERSION=$(BUILD_VER) -DD_DSG_APP_DATA_FALLBACK=/var/dsg/appdata
#override_dh_auto_test:
# echo "skip auto test"

909
debian/symbols.amd64 vendored
View File

@ -1,909 +0,0 @@
libdtkcore.so.5 libdtkcore5 #MINVER#
_Z19qInitResources_utilv@Base 5.0.3
_Z22qCleanupResources_utilv@Base 5.0.3
_ZGVZN3Dtk4Core11DLogManager8instanceEvE8instance@Base 5.0.3
_ZN10QByteArrayD1Ev@Base 5.0.3
_ZN10QByteArrayD2Ev@Base 5.0.3
_ZN11DDBusCaller3argI7QStringEES_RKT_@Base 5.0.3
_ZN11DDBusCaller4callEv@Base 5.0.3
_ZN11DDBusCallerC1ERK7QStringSt10shared_ptrI9DDBusDataE@Base 5.0.3
_ZN11DDBusCallerC2ERK7QStringSt10shared_ptrI9DDBusDataE@Base 5.0.3
_ZN11DDBusCallerD1Ev@Base 5.0.3
_ZN11DDBusCallerD2Ev@Base 5.0.3
_ZN11DDBusSender4pathERK7QString@Base 5.0.3
_ZN11DDBusSender4typeEN15QDBusConnection7BusTypeE@Base 5.0.3
_ZN11DDBusSender6methodERK7QString@Base 5.0.3
_ZN11DDBusSender7serviceERK7QString@Base 5.0.3
_ZN11DDBusSender8propertyERK7QString@Base 5.0.3
_ZN11DDBusSender9interfaceERK7QString@Base 5.0.3
_ZN11DDBusSenderC1Ev@Base 5.0.3
_ZN11DDBusSenderC2Ev@Base 5.0.3
_ZN12QWeakPointerI7QObjectED1Ev@Base 5.0.3
_ZN12QWeakPointerI7QObjectED2Ev@Base 5.0.3
_ZN13DDBusProperty3getEv@Base 5.0.3
_ZN13DDBusPropertyC1ERK7QStringSt10shared_ptrI9DDBusDataE@Base 5.0.3
_ZN13DDBusPropertyC2ERK7QStringSt10shared_ptrI9DDBusDataE@Base 5.0.3
_ZN14QScopedPointerIN3Dtk4Core23GSettingsBackendPrivateE21QScopedPointerDeleterIS2_EED1Ev@Base 5.0.3
_ZN14QScopedPointerIN3Dtk4Core23GSettingsBackendPrivateE21QScopedPointerDeleterIS2_EED2Ev@Base 5.0.3
_ZN15QVarLengthArrayIcLi4096EEC1Ei@Base 5.0.3
_ZN15QVarLengthArrayIcLi4096EEC2Ei@Base 5.0.3
_ZN3Dtk4Core10doUnescapeER7QStringRK5QHashI5QCharS4_E@Base 5.0.3
_ZN3Dtk4Core11DLogManager12setLogFormatERK7QString@Base 5.0.3
_ZN3Dtk4Core11DLogManager14getlogFilePathEv@Base 5.0.3
_ZN3Dtk4Core11DLogManager14setlogFilePathERK7QString@Base 5.0.3
_ZN3Dtk4Core11DLogManager19initConsoleAppenderEv@Base 5.0.3
_ZN3Dtk4Core11DLogManager20registerFileAppenderEv@Base 5.0.3
_ZN3Dtk4Core11DLogManager23initRollingFileAppenderEv@Base 5.0.3
_ZN3Dtk4Core11DLogManager23registerConsoleAppenderEv@Base 5.0.3
_ZN3Dtk4Core11DLogManager8joinPathERK7QStringS4_@Base 5.0.3
_ZN3Dtk4Core11DLogManagerC1Ev@Base 5.0.3
_ZN3Dtk4Core11DLogManagerC2Ev@Base 5.0.3
_ZN3Dtk4Core11DLogManagerD1Ev@Base 5.0.3
_ZN3Dtk4Core11DLogManagerD2Ev@Base 5.0.3
_ZN3Dtk4Core11DVtableHook10copyVtableEPPy@Base 5.0.3
_ZN3Dtk4Core11DVtableHook11originalFunEPKvy@Base 5.0.3
_ZN3Dtk4Core11DVtableHook11resetVtableEPKv@Base 5.0.3
_ZN3Dtk4Core11DVtableHook12ensureVtableEPKvSt8functionIFvvEE@Base 5.0.3
_ZN3Dtk4Core11DVtableHook13resetVfptrFunEPKvy@Base 5.0.3
_ZN3Dtk4Core11DVtableHook14objDestructFunE@Base 5.0.3
_ZN3Dtk4Core11DVtableHook15autoCleanVtableEPKv@Base 5.0.3
_ZN3Dtk4Core11DVtableHook15objToGhostVfptrE@Base 5.0.3
_ZN3Dtk4Core11DVtableHook16clearGhostVtableEPKv@Base 5.0.3
_ZN3Dtk4Core11DVtableHook16forceWriteMemoryEPvPKvm@Base 5.0.3
_ZN3Dtk4Core11DVtableHook18objToOriginalVfptrE@Base 5.0.3
_ZN3Dtk4Core11DVtableHook19getDestructFunIndexEPPySt8functionIFvvEE@Base 5.0.3
_ZN3Dtk4Core11DVtableHook7resolveEPKc@Base 5.0.3
_ZN3Dtk4Core11DVtableHook9hasVtableEPKv@Base 5.0.3
_ZN3Dtk4Core11unqtifyNameERK7QString@Base 5.0.3
_ZN3Dtk4Core12DFileWatcher11onFileMovedERK7QStringS4_S4_S4_@Base 5.0.3
_ZN3Dtk4Core12DFileWatcher11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.3
_ZN3Dtk4Core12DFileWatcher11qt_metacastEPKc@Base 5.0.3
_ZN3Dtk4Core12DFileWatcher12onFileClosedERK7QStringS4_@Base 5.0.3
_ZN3Dtk4Core12DFileWatcher13onFileCreatedERK7QStringS4_@Base 5.0.3
_ZN3Dtk4Core12DFileWatcher13onFileDeletedERK7QStringS4_@Base 5.0.3
_ZN3Dtk4Core12DFileWatcher14onFileModifiedERK7QStringS4_@Base 5.0.3
_ZN3Dtk4Core12DFileWatcher16staticMetaObjectE@Base 5.0.3
_ZN3Dtk4Core12DFileWatcher22onFileAttributeChangedERK7QStringS4_@Base 5.0.3
_ZN3Dtk4Core12DFileWatcherC1ERK7QStringP7QObject@Base 5.0.3
_ZN3Dtk4Core12DFileWatcherC2ERK7QStringP7QObject@Base 5.0.3
_ZN3Dtk4Core12DFileWatcherD0Ev@Base 5.0.3
_ZN3Dtk4Core12DFileWatcherD1Ev@Base 5.0.3
_ZN3Dtk4Core12DFileWatcherD2Ev@Base 5.0.3
_ZN3Dtk4Core12FileAppender11setFileNameERK7QString@Base 5.0.3
_ZN3Dtk4Core12FileAppender6appendERK9QDateTimeNS0_6Logger8LogLevelEPKciS8_RK7QStringSB_@Base 5.0.3
_ZN3Dtk4Core12FileAppender8openFileEv@Base 5.0.3
_ZN3Dtk4Core12FileAppender9closeFileEv@Base 5.0.3
_ZN3Dtk4Core12FileAppenderC1ERK7QString@Base 5.0.3
_ZN3Dtk4Core12FileAppenderC2ERK7QString@Base 5.0.3
_ZN3Dtk4Core12FileAppenderD0Ev@Base 5.0.3
_ZN3Dtk4Core12FileAppenderD1Ev@Base 5.0.3
_ZN3Dtk4Core12FileAppenderD2Ev@Base 5.0.3
_ZN3Dtk4Core13DDesktopEntry10escapeExecER7QString@Base 5.0.3
_ZN3Dtk4Core13DDesktopEntry11removeEntryERK7QStringS4_@Base 5.0.3
_ZN3Dtk4Core13DDesktopEntry11setRawValueERK7QStringS4_S4_@Base 5.0.3
_ZN3Dtk4Core13DDesktopEntry12unescapeExecER7QString@Base 5.0.3
_ZN3Dtk4Core13DDesktopEntry14setStringValueERK7QStringS4_S4_@Base 5.0.3
_ZN3Dtk4Core13DDesktopEntry16staticMetaObjectE@Base 5.0.3
_ZN3Dtk4Core13DDesktopEntry17setLocalizedValueERK7QStringS4_S4_S4_@Base 5.0.3
_ZN3Dtk4Core13DDesktopEntry6escapeER7QString@Base 5.0.3
_ZN3Dtk4Core13DDesktopEntry8unescapeER7QStringb@Base 5.0.3
_ZN3Dtk4Core13DDesktopEntry9setStatusERKNS1_6StatusE@Base 5.0.3
_ZN3Dtk4Core13DDesktopEntryC1ERK7QString@Base 5.0.3
_ZN3Dtk4Core13DDesktopEntryC2ERK7QString@Base 5.0.3
_ZN3Dtk4Core13DDesktopEntryD1Ev@Base 5.0.3
_ZN3Dtk4Core13DDesktopEntryD2Ev@Base 5.0.3
_ZN3Dtk4Core13DFileServices10showFolderE4QUrlRK7QString@Base 5.0.3
_ZN3Dtk4Core13DFileServices10showFolderE7QStringRKS2_@Base 5.0.3
_ZN3Dtk4Core13DFileServices11showFoldersE5QListI4QUrlERK7QString@Base 5.0.3
_ZN3Dtk4Core13DFileServices11showFoldersE5QListI7QStringERKS3_@Base 5.0.3
_ZN3Dtk4Core13DFileServices12errorMessageEv@Base 5.0.3
_ZN3Dtk4Core13DFileServices12showFileItemE4QUrlRK7QString@Base 5.0.3
_ZN3Dtk4Core13DFileServices12showFileItemE7QStringRKS2_@Base 5.0.3
_ZN3Dtk4Core13DFileServices13showFileItemsE5QListI4QUrlERK7QString@Base 5.0.3
_ZN3Dtk4Core13DFileServices13showFileItemsE5QListI7QStringERKS3_@Base 5.0.3
_ZN3Dtk4Core13DFileServices21showFileItemPropertieE4QUrlRK7QString@Base 5.0.3
_ZN3Dtk4Core13DFileServices21showFileItemPropertieE7QStringRKS2_@Base 5.0.3
_ZN3Dtk4Core13DFileServices22showFileItemPropertiesE5QListI4QUrlERK7QString@Base 5.0.3
_ZN3Dtk4Core13DFileServices22showFileItemPropertiesE5QListI7QStringERKS3_@Base 5.0.3
_ZN3Dtk4Core13DFileServices5trashE4QUrl@Base 5.0.3
_ZN3Dtk4Core13DFileServices5trashE5QListI4QUrlE@Base 5.0.3
_ZN3Dtk4Core13DFileServices5trashE5QListI7QStringE@Base 5.0.3
_ZN3Dtk4Core13DFileServices5trashE7QString@Base 5.0.3
_ZN3Dtk4Core13DSecureStringC1ERK7QString@Base 5.0.3
_ZN3Dtk4Core13DSecureStringC2ERK7QString@Base 5.0.3
_ZN3Dtk4Core13DSecureStringD1Ev@Base 5.0.3
_ZN3Dtk4Core13DSecureStringD2Ev@Base 5.0.3
_ZN3Dtk4Core13DTrashManager10cleanTrashEv@Base 5.0.3
_ZN3Dtk4Core13DTrashManager11moveToTrashERK7QStringb@Base 5.0.3
_ZN3Dtk4Core13DTrashManager8instanceEv@Base 5.0.3
_ZN3Dtk4Core13DTrashManagerC1Ev@Base 5.0.3
_ZN3Dtk4Core13DTrashManagerC2Ev@Base 5.0.3
_ZN3Dtk4Core13DTrashManagerD0Ev@Base 5.0.3
_ZN3Dtk4Core13DTrashManagerD1Ev@Base 5.0.3
_ZN3Dtk4Core13DTrashManagerD2Ev@Base 5.0.3
_ZN3Dtk4Core13LoggerPrivate14globalInstanceE@Base 5.0.3
_ZN3Dtk4Core13LoggerPrivate18globalInstanceLockE@Base 5.0.3
_ZN3Dtk4Core14Chinese2PinyinERK7QString@Base 5.0.3
_ZN3Dtk4Core14DObjectPrivateC1EPNS0_7DObjectE@Base 5.0.3
_ZN3Dtk4Core14DObjectPrivateC2EPNS0_7DObjectE@Base 5.0.3
_ZN3Dtk4Core14DObjectPrivateD0Ev@Base 5.0.3
_ZN3Dtk4Core14DObjectPrivateD1Ev@Base 5.0.3
_ZN3Dtk4Core14DObjectPrivateD2Ev@Base 5.0.3
_ZN3Dtk4Core14DRecentManager10removeItemERK7QString@Base 5.0.3
_ZN3Dtk4Core14DRecentManager11removeItemsERK11QStringList@Base 5.0.3
_ZN3Dtk4Core14DRecentManager7addItemERK7QStringRNS0_11DRecentDataE@Base 5.0.3
_ZN3Dtk4Core14DSettingsGroup11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.3
_ZN3Dtk4Core14DSettingsGroup11qt_metacastEPKc@Base 5.0.3
_ZN3Dtk4Core14DSettingsGroup14setParentGroupE8QPointerIS1_E@Base 5.0.3
_ZN3Dtk4Core14DSettingsGroup16staticMetaObjectE@Base 5.0.3
_ZN3Dtk4Core14DSettingsGroup8fromJsonERK7QStringRK11QJsonObject@Base 5.0.3
_ZN3Dtk4Core14DSettingsGroup9parseJsonERK7QStringRK11QJsonObject@Base 5.0.3
_ZN3Dtk4Core14DSettingsGroupC1EP7QObject@Base 5.0.3
_ZN3Dtk4Core14DSettingsGroupC2EP7QObject@Base 5.0.3
_ZN3Dtk4Core14DSettingsGroupD0Ev@Base 5.0.3
_ZN3Dtk4Core14DSettingsGroupD1Ev@Base 5.0.3
_ZN3Dtk4Core14DSettingsGroupD2Ev@Base 5.0.3
_ZN3Dtk4Core14DStandardPaths14findExecutableERK7QStringRK11QStringList@Base 5.0.3
_ZN3Dtk4Core14DStandardPaths16writableLocationEN14QStandardPaths16StandardLocationE@Base 5.0.3
_ZN3Dtk4Core14DStandardPaths17standardLocationsEN14QStandardPaths16StandardLocationE@Base 5.0.3
_ZN3Dtk4Core14DStandardPaths6locateEN14QStandardPaths16StandardLocationERK7QString6QFlagsINS2_12LocateOptionEE@Base 5.0.3
_ZN3Dtk4Core14DStandardPaths7setModeENS1_4ModeE@Base 5.0.3
_ZN3Dtk4Core14DStandardPaths9locateAllEN14QStandardPaths16StandardLocationERK7QString6QFlagsINS2_12LocateOptionEE@Base 5.0.3
_ZN3Dtk4Core14DTrashManager_D0Ev@Base 5.0.3
_ZN3Dtk4Core14DTrashManager_D1Ev@Base 5.0.3
_ZN3Dtk4Core14DTrashManager_D2Ev@Base 5.0.3
_ZN3Dtk4Core14loggerInstanceEv@Base 5.0.3
_ZN3Dtk4Core14parentPathListERK7QString@Base 5.0.3
_ZN3Dtk4Core15ConsoleAppender24ignoreEnvironmentPatternEb@Base 5.0.3
_ZN3Dtk4Core15ConsoleAppender6appendERK9QDateTimeNS0_6Logger8LogLevelEPKciS8_RK7QStringSB_@Base 5.0.3
_ZN3Dtk4Core15ConsoleAppenderC1Ev@Base 5.0.3
_ZN3Dtk4Core15ConsoleAppenderC2Ev@Base 5.0.3
_ZN3Dtk4Core15ConsoleAppenderD0Ev@Base 5.0.3
_ZN3Dtk4Core15ConsoleAppenderD1Ev@Base 5.0.3
_ZN3Dtk4Core15ConsoleAppenderD2Ev@Base 5.0.3
_ZN3Dtk4Core15DSettingsOption11dataChangedERK7QString8QVariant@Base 5.0.3
_ZN3Dtk4Core15DSettingsOption11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.3
_ZN3Dtk4Core15DSettingsOption11qt_metacastEPKc@Base 5.0.3
_ZN3Dtk4Core15DSettingsOption12valueChangedE8QVariant@Base 5.0.3
_ZN3Dtk4Core15DSettingsOption14setParentGroupE8QPointerINS0_14DSettingsGroupEE@Base 5.0.3
_ZN3Dtk4Core15DSettingsOption16staticMetaObjectE@Base 5.0.3
_ZN3Dtk4Core15DSettingsOption7setDataERK7QString8QVariant@Base 5.0.3
_ZN3Dtk4Core15DSettingsOption8fromJsonERK7QStringRK11QJsonObject@Base 5.0.3
_ZN3Dtk4Core15DSettingsOption8setValueE8QVariant@Base 5.0.3
_ZN3Dtk4Core15DSettingsOption9parseJsonERK7QStringRK11QJsonObject@Base 5.0.3
_ZN3Dtk4Core15DSettingsOptionC1EP7QObject@Base 5.0.3
_ZN3Dtk4Core15DSettingsOptionC2EP7QObject@Base 5.0.3
_ZN3Dtk4Core15DSettingsOptionD0Ev@Base 5.0.3
_ZN3Dtk4Core15DSettingsOptionD1Ev@Base 5.0.3
_ZN3Dtk4Core15DSettingsOptionD2Ev@Base 5.0.3
_ZN3Dtk4Core15DSysInfoPrivate13parseInfoFileER5QFile@Base 5.0.3
_ZN3Dtk4Core15DSysInfoPrivate16ensureDeepinInfoEv@Base 5.0.3
_ZN3Dtk4Core15DSysInfoPrivate17ensureReleaseInfoEv@Base 5.0.3
_ZN3Dtk4Core15DSysInfoPrivate18ensureComputerInfoEv@Base 5.0.3
_ZN3Dtk4Core15DSysInfoPrivateC1Ev@Base 5.0.3
_ZN3Dtk4Core15DSysInfoPrivateC2Ev@Base 5.0.3
_ZN3Dtk4Core15QSettingBackend11doSetOptionERK7QStringRK8QVariant@Base 5.0.3
_ZN3Dtk4Core15QSettingBackend11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.3
_ZN3Dtk4Core15QSettingBackend11qt_metacastEPKc@Base 5.0.3
_ZN3Dtk4Core15QSettingBackend16staticMetaObjectE@Base 5.0.3
_ZN3Dtk4Core15QSettingBackend6doSyncEv@Base 5.0.3
_ZN3Dtk4Core15QSettingBackendC1ERK7QStringP7QObject@Base 5.0.3
_ZN3Dtk4Core15QSettingBackendC2ERK7QStringP7QObject@Base 5.0.3
_ZN3Dtk4Core15QSettingBackendD0Ev@Base 5.0.3
_ZN3Dtk4Core15QSettingBackendD1Ev@Base 5.0.3
_ZN3Dtk4Core15QSettingBackendD2Ev@Base 5.0.3
_ZN3Dtk4Core16AbstractAppender15setDetailsLevelENS0_6Logger8LogLevelE@Base 5.0.3
_ZN3Dtk4Core16AbstractAppender15setDetailsLevelERK7QString@Base 5.0.3
_ZN3Dtk4Core16AbstractAppender5writeERK9QDateTimeNS0_6Logger8LogLevelEPKciS8_RK7QStringSB_@Base 5.0.3
_ZN3Dtk4Core16AbstractAppenderC1Ev@Base 5.0.3
_ZN3Dtk4Core16AbstractAppenderC2Ev@Base 5.0.3
_ZN3Dtk4Core16AbstractAppenderD0Ev@Base 5.0.3
_ZN3Dtk4Core16AbstractAppenderD1Ev@Base 5.0.3
_ZN3Dtk4Core16AbstractAppenderD2Ev@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher10fileClosedERK4QUrl@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher11fileDeletedERK4QUrl@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher11ghostSignalERK4QUrlMS1_FvS4_ES4_@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher11ghostSignalERK4QUrlMS1_FvS4_S4_ES4_S4_@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher11qt_metacastEPKc@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher11stopWatcherEv@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher12fileModifiedERK4QUrl@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher12startWatcherEv@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher14restartWatcherEv@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher14subfileCreatedERK4QUrl@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher16staticMetaObjectE@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher20fileAttributeChangedERK4QUrl@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher24setEnabledSubfileWatcherERK4QUrlb@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcher9fileMovedERK4QUrlS4_@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcherC1ERNS0_23DBaseFileWatcherPrivateERK4QUrlP7QObject@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcherC2ERNS0_23DBaseFileWatcherPrivateERK4QUrlP7QObject@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcherD0Ev@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcherD1Ev@Base 5.0.3
_ZN3Dtk4Core16DBaseFileWatcherD2Ev@Base 5.0.3
_ZN3Dtk4Core16DSettingsBackend11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.3
_ZN3Dtk4Core16DSettingsBackend11qt_metacastEPKc@Base 5.0.3
_ZN3Dtk4Core16DSettingsBackend13optionChangedERK7QStringRK8QVariant@Base 5.0.3
_ZN3Dtk4Core16DSettingsBackend16staticMetaObjectE@Base 5.0.3
_ZN3Dtk4Core16DSettingsBackend4syncEv@Base 5.0.3
_ZN3Dtk4Core16DSettingsBackend9setOptionERK7QStringRK8QVariant@Base 5.0.3
_ZN3Dtk4Core16GSettingsBackend11doSetOptionERK7QStringRK8QVariant@Base 5.0.3
_ZN3Dtk4Core16GSettingsBackend11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.3
_ZN3Dtk4Core16GSettingsBackend11qt_metacastEPKc@Base 5.0.3
_ZN3Dtk4Core16GSettingsBackend16staticMetaObjectE@Base 5.0.3
_ZN3Dtk4Core16GSettingsBackend6doSyncEv@Base 5.0.3
_ZN3Dtk4Core16GSettingsBackendC1EPNS0_9DSettingsEP7QObject@Base 5.0.3
_ZN3Dtk4Core16GSettingsBackendC2EPNS0_9DSettingsEP7QObject@Base 5.0.3
_ZN3Dtk4Core16GSettingsBackendD0Ev@Base 5.0.3
_ZN3Dtk4Core16GSettingsBackendD1Ev@Base 5.0.3
_ZN3Dtk4Core16GSettingsBackendD2Ev@Base 5.0.3
_ZN3Dtk4Core16readLineFromDataERK10QByteArrayRiS4_S4_S4_@Base 5.0.3
_ZN3Dtk4Core18DDiskSizeFormatter4rateEi@Base 5.0.3
_ZN3Dtk4Core18DDiskSizeFormatterC1Ev@Base 5.0.3
_ZN3Dtk4Core18DDiskSizeFormatterC2Ev@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcher10fileClosedERK7QStringS4_NS1_14QPrivateSignalE@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcher10removePathERK7QString@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcher11fileCreatedERK7QStringS4_NS1_14QPrivateSignalE@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcher11fileDeletedERK7QStringS4_NS1_14QPrivateSignalE@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcher11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcher11qt_metacastEPKc@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcher11removePathsERK11QStringList@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcher12fileModifiedERK7QStringS4_NS1_14QPrivateSignalE@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcher16staticMetaObjectE@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcher20fileAttributeChangedERK7QStringS4_NS1_14QPrivateSignalE@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcher7addPathERK7QString@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcher8addPathsERK11QStringList@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcher9fileMovedERK7QStringS4_S4_S4_NS1_14QPrivateSignalE@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcherC1EP7QObject@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcherC1ERK11QStringListP7QObject@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcherC2EP7QObject@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcherC2ERK11QStringListP7QObject@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcherD0Ev@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcherD1Ev@Base 5.0.3
_ZN3Dtk4Core18DFileSystemWatcherD2Ev@Base 5.0.3
_ZN3Dtk4Core18DTimeUnitFormatterC1Ev@Base 5.0.3
_ZN3Dtk4Core18DTimeUnitFormatterC2Ev@Base 5.0.3
_ZN3Dtk4Core18LoggerTimingHelper5startEPKcz@Base 5.0.3
_ZN3Dtk4Core18LoggerTimingHelper5startERK7QString@Base 5.0.3
_ZN3Dtk4Core18LoggerTimingHelperD1Ev@Base 5.0.3
_ZN3Dtk4Core18LoggerTimingHelperD2Ev@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManager10fileClosedERK7QString@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManager11fileDeletedERK7QString@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManager11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManager11qt_metacastEPKc@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManager12fileModifiedERK7QString@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManager14subfileCreatedERK7QString@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManager16staticMetaObjectE@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManager20fileAttributeChangedERK7QString@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManager3addERK7QString@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManager6removeERK7QString@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManager9fileMovedERK7QStringS4_@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManagerC1EP7QObject@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManagerC2EP7QObject@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManagerD0Ev@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManagerD1Ev@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherManagerD2Ev@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherPrivate10formatPathERK7QString@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherPrivate18_q_handleFileCloseERK7QStringS4_@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherPrivate18_q_handleFileMovedERK7QStringS4_S4_S4_@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherPrivate20_q_handleFileCreatedERK7QStringS4_@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherPrivate20_q_handleFileDeletedERK7QStringS4_@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherPrivate21_q_handleFileModifiedERK7QStringS4_@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherPrivate22filePathToWatcherCountE@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherPrivate29_q_handleFileAttributeChangedERK7QStringS4_@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherPrivate4stopEv@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherPrivate5startEv@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherPrivateD0Ev@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherPrivateD1Ev@Base 5.0.3
_ZN3Dtk4Core19DFileWatcherPrivateD2Ev@Base 5.0.3
_ZN3Dtk4Core19RollingFileAppender14removeOldFilesEv@Base 5.0.3
_ZN3Dtk4Core19RollingFileAppender14setDatePatternENS1_11DatePatternE@Base 5.0.3
_ZN3Dtk4Core19RollingFileAppender14setDatePatternERK7QString@Base 5.0.3
_ZN3Dtk4Core19RollingFileAppender16computeFrequencyEv@Base 5.0.3
_ZN3Dtk4Core19RollingFileAppender16setLogFilesLimitEi@Base 5.0.3
_ZN3Dtk4Core19RollingFileAppender19computeRollOverTimeEv@Base 5.0.3
_ZN3Dtk4Core19RollingFileAppender20setDatePatternStringERK7QString@Base 5.0.3
_ZN3Dtk4Core19RollingFileAppender6appendERK9QDateTimeNS0_6Logger8LogLevelEPKciS8_RK7QStringSB_@Base 5.0.3
_ZN3Dtk4Core19RollingFileAppender8rollOverEv@Base 5.0.3
_ZN3Dtk4Core19RollingFileAppenderC1ERK7QString@Base 5.0.3
_ZN3Dtk4Core19RollingFileAppenderC2ERK7QString@Base 5.0.3
_ZN3Dtk4Core19RollingFileAppenderD0Ev@Base 5.0.3
_ZN3Dtk4Core19RollingFileAppenderD1Ev@Base 5.0.3
_ZN3Dtk4Core19RollingFileAppenderD2Ev@Base 5.0.3
_ZN3Dtk4Core20DDesktopEntryPrivate20initSectionsFromDataERK10QByteArray@Base 5.0.3
_ZN3Dtk4Core20DDesktopEntryPrivate3getERK7QStringS4_PS2_@Base 5.0.3
_ZN3Dtk4Core20DDesktopEntryPrivate3setERK7QStringS4_S4_@Base 5.0.3
_ZN3Dtk4Core20DDesktopEntryPrivate6removeERK7QStringS4_@Base 5.0.3
_ZN3Dtk4Core20DDesktopEntryPrivate9fuzzyLoadEv@Base 5.0.3
_ZN3Dtk4Core20DDesktopEntryPrivateC1ERK7QStringPNS0_13DDesktopEntryE@Base 5.0.3
_ZN3Dtk4Core20DDesktopEntryPrivateC2ERK7QStringPNS0_13DDesktopEntryE@Base 5.0.3
_ZN3Dtk4Core20DDesktopEntryPrivateD1Ev@Base 5.0.3
_ZN3Dtk4Core20DDesktopEntryPrivateD2Ev@Base 5.0.3
_ZN3Dtk4Core20DDesktopEntrySection23ensureSectionDataParsedEv@Base 5.0.3
_ZN3Dtk4Core20DDesktopEntrySectionD1Ev@Base 5.0.3
_ZN3Dtk4Core20DDesktopEntrySectionD2Ev@Base 5.0.3
_ZN3Dtk4Core20DDesktopEntrySectionaSERKS1_@Base 5.0.3
_ZN3Dtk4Core20DTrashManagerPrivate15removeFileOrDirERK7QString@Base 5.0.3
_ZN3Dtk4Core20DTrashManagerPrivate18removeFromIteratorER12QDirIterator@Base 5.0.3
_ZN3Dtk4Core20DTrashManagerPrivateD0Ev@Base 5.0.3
_ZN3Dtk4Core20DTrashManagerPrivateD1Ev@Base 5.0.3
_ZN3Dtk4Core20DTrashManagerPrivateD2Ev@Base 5.0.3
_ZN3Dtk4Core21DSettingsGroupPrivate9parseJsonERK7QStringRK11QJsonObject@Base 5.0.3
_ZN3Dtk4Core22AbstractStringAppender16qCleanupFuncinfoEPKc@Base 5.0.3
_ZN3Dtk4Core22AbstractStringAppender17stripFunctionNameEPKc@Base 5.0.3
_ZN3Dtk4Core22AbstractStringAppender9setFormatERK7QString@Base 5.0.3
_ZN3Dtk4Core22AbstractStringAppenderC1Ev@Base 5.0.3
_ZN3Dtk4Core22AbstractStringAppenderC2Ev@Base 5.0.3
_ZN3Dtk4Core22AbstractStringAppenderD0Ev@Base 5.0.3
_ZN3Dtk4Core22AbstractStringAppenderD1Ev@Base 5.0.3
_ZN3Dtk4Core22AbstractStringAppenderD2Ev@Base 5.0.3
_ZN3Dtk4Core22DAbstractUnitFormatterC1Ev@Base 5.0.3
_ZN3Dtk4Core22DAbstractUnitFormatterC2Ev@Base 5.0.3
_ZN3Dtk4Core22DAbstractUnitFormatterD1Ev@Base 5.0.3
_ZN3Dtk4Core22DAbstractUnitFormatterD2Ev@Base 5.0.3
_ZN3Dtk4Core22DSettingsOptionPrivate9parseJsonERK7QStringRK11QJsonObject@Base 5.0.3
_ZN3Dtk4Core23DBaseFileWatcherPrivate11watcherListE@Base 5.0.3
_ZN3Dtk4Core23DBaseFileWatcherPrivateC1EPNS0_16DBaseFileWatcherE@Base 5.0.3
_ZN3Dtk4Core23DBaseFileWatcherPrivateC2EPNS0_16DBaseFileWatcherE@Base 5.0.3
_ZN3Dtk4Core25DFileSystemWatcherPrivate11removePathsERK11QStringListPS2_S5_@Base 5.0.3
_ZN3Dtk4Core25DFileSystemWatcherPrivate13onFileChangedERK7QStringb@Base 5.0.3
_ZN3Dtk4Core25DFileSystemWatcherPrivate18_q_readFromInotifyEv@Base 5.0.3
_ZN3Dtk4Core25DFileSystemWatcherPrivate18onDirectoryChangedERK7QStringb@Base 5.0.3
_ZN3Dtk4Core25DFileSystemWatcherPrivate8addPathsERK11QStringListPS2_S5_@Base 5.0.3
_ZN3Dtk4Core25DFileSystemWatcherPrivateC1EiPNS0_18DFileSystemWatcherE@Base 5.0.3
_ZN3Dtk4Core25DFileSystemWatcherPrivateC2EiPNS0_18DFileSystemWatcherE@Base 5.0.3
_ZN3Dtk4Core25DFileSystemWatcherPrivateD0Ev@Base 5.0.3
_ZN3Dtk4Core25DFileSystemWatcherPrivateD1Ev@Base 5.0.3
_ZN3Dtk4Core25DFileSystemWatcherPrivateD2Ev@Base 5.0.3
_ZN3Dtk4Core26DFileWatcherManagerPrivateC1EPNS0_19DFileWatcherManagerE@Base 5.0.3
_ZN3Dtk4Core26DFileWatcherManagerPrivateC2EPNS0_19DFileWatcherManagerE@Base 5.0.3
_ZN3Dtk4Core26DFileWatcherManagerPrivateD0Ev@Base 5.0.3
_ZN3Dtk4Core26DFileWatcherManagerPrivateD1Ev@Base 5.0.3
_ZN3Dtk4Core26DFileWatcherManagerPrivateD2Ev@Base 5.0.3
_ZN3Dtk4Core5DUtil13DNotifySender4callEv@Base 5.0.3
_ZN3Dtk4Core5DUtil13DNotifySender5hintsERK4QMapI7QString8QVariantE@Base 5.0.3
_ZN3Dtk4Core5DUtil13DNotifySender7actionsERK11QStringList@Base 5.0.3
_ZN3Dtk4Core5DUtil13DNotifySender7appBodyERK7QString@Base 5.0.3
_ZN3Dtk4Core5DUtil13DNotifySender7appIconERK7QString@Base 5.0.3
_ZN3Dtk4Core5DUtil13DNotifySender7appNameERK7QString@Base 5.0.3
_ZN3Dtk4Core5DUtil13DNotifySender7timeOutEi@Base 5.0.3
_ZN3Dtk4Core5DUtil13DNotifySender9replaceIdEj@Base 5.0.3
_ZN3Dtk4Core5DUtil13DNotifySenderC1ERK7QString@Base 5.0.3
_ZN3Dtk4Core5DUtil13DNotifySenderC2ERK7QString@Base 5.0.3
_ZN3Dtk4Core5DUtil18DExportedInterface11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.3
_ZN3Dtk4Core5DUtil18DExportedInterface11qt_metacastEPKc@Base 5.0.3
_ZN3Dtk4Core5DUtil18DExportedInterface14registerActionERK7QStringS5_St8functionIF8QVariantS3_EE@Base 5.0.3
_ZN3Dtk4Core5DUtil18DExportedInterface16staticMetaObjectE@Base 5.0.3
_ZN3Dtk4Core5DUtil18DExportedInterfaceC1EP7QObject@Base 5.0.3
_ZN3Dtk4Core5DUtil18DExportedInterfaceC2EP7QObject@Base 5.0.3
_ZN3Dtk4Core5DUtil18DExportedInterfaceD0Ev@Base 5.0.3
_ZN3Dtk4Core5DUtil18DExportedInterfaceD1Ev@Base 5.0.3
_ZN3Dtk4Core5DUtil18DExportedInterfaceD2Ev@Base 5.0.3
_ZN3Dtk4Core5DUtil25DExportedInterfacePrivate10actionHelpE7QStringi@Base 5.0.3
_ZN3Dtk4Core5DUtil25DExportedInterfacePrivateC1EPNS1_18DExportedInterfaceE@Base 5.0.3
_ZN3Dtk4Core5DUtil25DExportedInterfacePrivateC2EPNS1_18DExportedInterfaceE@Base 5.0.3
_ZN3Dtk4Core5DUtil25DExportedInterfacePrivateD0Ev@Base 5.0.3
_ZN3Dtk4Core5DUtil25DExportedInterfacePrivateD1Ev@Base 5.0.3
_ZN3Dtk4Core5DUtil25DExportedInterfacePrivateD2Ev@Base 5.0.3
_ZN3Dtk4Core5DUtil31DExportedInterfaceDBusInterface11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.3
_ZN3Dtk4Core5DUtil31DExportedInterfaceDBusInterface11qt_metacastEPKc@Base 5.0.3
_ZN3Dtk4Core5DUtil31DExportedInterfaceDBusInterface16staticMetaObjectE@Base 5.0.3
_ZN3Dtk4Core5DUtil31DExportedInterfaceDBusInterface4helpERK7QString@Base 5.0.3
_ZN3Dtk4Core5DUtil31DExportedInterfaceDBusInterface4listEv@Base 5.0.3
_ZN3Dtk4Core5DUtil31DExportedInterfaceDBusInterface6invokeE7QStringS3_@Base 5.0.3
_ZN3Dtk4Core5DUtil31DExportedInterfaceDBusInterfaceC1EPNS1_25DExportedInterfacePrivateE@Base 5.0.3
_ZN3Dtk4Core5DUtil31DExportedInterfaceDBusInterfaceC2EPNS1_25DExportedInterfacePrivateE@Base 5.0.3
_ZN3Dtk4Core5DUtil31DExportedInterfaceDBusInterfaceD0Ev@Base 5.0.3
_ZN3Dtk4Core5DUtil31DExportedInterfaceDBusInterfaceD1Ev@Base 5.0.3
_ZN3Dtk4Core5DUtil31DExportedInterfaceDBusInterfaceD2Ev@Base 5.0.3
_ZN3Dtk4Core6Logger11writeAssertEPKciS3_S3_@Base 5.0.3
_ZN3Dtk4Core6Logger13levelToStringENS1_8LogLevelE@Base 5.0.3
_ZN3Dtk4Core6Logger14globalInstanceEv@Base 5.0.3
_ZN3Dtk4Core6Logger15levelFromStringERK7QString@Base 5.0.3
_ZN3Dtk4Core6Logger16registerAppenderEPNS0_16AbstractAppenderE@Base 5.0.3
_ZN3Dtk4Core6Logger18setDefaultCategoryERK7QString@Base 5.0.3
_ZN3Dtk4Core6Logger19logToGlobalInstanceERK7QStringb@Base 5.0.3
_ZN3Dtk4Core6Logger24registerCategoryAppenderERK7QStringPNS0_16AbstractAppenderE@Base 5.0.3
_ZN3Dtk4Core6Logger5writeENS1_8LogLevelEPKciS4_S4_@Base 5.0.3
_ZN3Dtk4Core6Logger5writeENS1_8LogLevelEPKciS4_S4_RK7QString@Base 5.0.3
_ZN3Dtk4Core6Logger5writeERK9QDateTimeNS1_8LogLevelEPKciS7_S7_RK7QString@Base 5.0.3
_ZN3Dtk4Core6Logger5writeERK9QDateTimeNS1_8LogLevelEPKciS7_S7_RK7QStringb@Base 5.0.3
_ZN3Dtk4Core6LoggerC1ERK7QString@Base 5.0.3
_ZN3Dtk4Core6LoggerC1Ev@Base 5.0.3
_ZN3Dtk4Core6LoggerC2ERK7QString@Base 5.0.3
_ZN3Dtk4Core6LoggerC2Ev@Base 5.0.3
_ZN3Dtk4Core6LoggerD1Ev@Base 5.0.3
_ZN3Dtk4Core6LoggerD2Ev@Base 5.0.3
_ZN3Dtk4Core7DObjectC1EPS1_@Base 5.0.3
_ZN3Dtk4Core7DObjectC1ERNS0_14DObjectPrivateEPS1_@Base 5.0.3
_ZN3Dtk4Core7DObjectC2EPS1_@Base 5.0.3
_ZN3Dtk4Core7DObjectC2ERNS0_14DObjectPrivateEPS1_@Base 5.0.3
_ZN3Dtk4Core7DObjectD0Ev@Base 5.0.3
_ZN3Dtk4Core7DObjectD1Ev@Base 5.0.3
_ZN3Dtk4Core7DObjectD2Ev@Base 5.0.3
_ZN3Dtk4Core8DPathBufC1ERK7QString@Base 5.0.3
_ZN3Dtk4Core8DPathBufC1Ev@Base 5.0.3
_ZN3Dtk4Core8DPathBufC2ERK7QString@Base 5.0.3
_ZN3Dtk4Core8DPathBufC2Ev@Base 5.0.3
_ZN3Dtk4Core8DSysInfo10deepinTypeEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo11productTypeEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo12computerNameEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo12cpuModelNameEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo13deepinEditionEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo13deepinVersionEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo14productVersionEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo14systemDiskSizeEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo15deepinCopyrightEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo15memoryTotalSizeEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo17productTypeStringEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo18isCommunityEditionEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo19distributionOrgLogoENS1_7OrgTypeENS1_8LogoTypeERK7QString@Base 5.0.3
_ZN3Dtk4Core8DSysInfo19distributionOrgNameENS1_7OrgTypeERK7QLocale@Base 5.0.3
_ZN3Dtk4Core8DSysInfo19memoryInstalledSizeEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo19operatingSystemNameEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo20distributionInfoPathEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo21deepinDistributorLogoENS1_8LogoTypeERK7QString@Base 5.0.3
_ZN3Dtk4Core8DSysInfo21deepinDistributorNameEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo21deepinTypeDisplayNameERK7QLocale@Base 5.0.3
_ZN3Dtk4Core8DSysInfo22distributionOrgWebsiteENS1_7OrgTypeE@Base 5.0.3
_ZN3Dtk4Core8DSysInfo24deepinDistributorWebsiteEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo26deepinDistributionInfoPathEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo27distributionInfoSectionNameENS1_7OrgTypeE@Base 5.0.3
_ZN3Dtk4Core8DSysInfo5isDDEEv@Base 5.0.3
_ZN3Dtk4Core8DSysInfo8isDeepinEv@Base 5.0.3
_ZN3Dtk4Core8doEscapeER7QStringRK5QHashI5QCharS4_E@Base 5.0.3
_ZN3Dtk4Core9DSettings10setBackendEPNS0_16DSettingsBackendE@Base 5.0.3
_ZN3Dtk4Core9DSettings11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.3
_ZN3Dtk4Core9DSettings11qt_metacastEPKc@Base 5.0.3
_ZN3Dtk4Core9DSettings12fromJsonFileERK7QString@Base 5.0.3
_ZN3Dtk4Core9DSettings12valueChangedERK7QStringRK8QVariant@Base 5.0.3
_ZN3Dtk4Core9DSettings16staticMetaObjectE@Base 5.0.3
_ZN3Dtk4Core9DSettings4syncEv@Base 5.0.3
_ZN3Dtk4Core9DSettings5resetEv@Base 5.0.3
_ZN3Dtk4Core9DSettings8fromJsonERK10QByteArray@Base 5.0.3
_ZN3Dtk4Core9DSettings9loadValueEv@Base 5.0.3
_ZN3Dtk4Core9DSettings9parseJsonERK10QByteArray@Base 5.0.3
_ZN3Dtk4Core9DSettings9setOptionERK7QStringRK8QVariant@Base 5.0.3
_ZN3Dtk4Core9DSettingsC1EP7QObject@Base 5.0.3
_ZN3Dtk4Core9DSettingsC2EP7QObject@Base 5.0.3
_ZN3Dtk4Core9DSettingsD0Ev@Base 5.0.3
_ZN3Dtk4Core9DSettingsD1Ev@Base 5.0.3
_ZN3Dtk4Core9DSettingsD2Ev@Base 5.0.3
_ZN3Dtk4Core9LogDevice8readDataEPcx@Base 5.0.3
_ZN3Dtk4Core9LogDevice9writeDataEPKcx@Base 5.0.3
_ZN3Dtk4Core9LogDeviceD0Ev@Base 5.0.3
_ZN3Dtk4Core9LogDeviceD1Ev@Base 5.0.3
_ZN3Dtk4Core9LogDeviceD2Ev@Base 5.0.3
_ZN3Dtk4Core9qtifyNameERK7QString@Base 5.0.3
_ZN4QMapI7QString5QPairIS0_yEE13detach_helperEv@Base 5.0.3
_ZN4QMapI7QString5QPairIS0_yEED1Ev@Base 5.0.3
_ZN4QMapI7QString5QPairIS0_yEED2Ev@Base 5.0.3
_ZN4QMapI7QString5QPairIS0_yEEixERKS0_@Base 5.0.3
_ZN4QMapI7QString8QPointerIN3Dtk4Core15DSettingsOptionEEE13detach_helperEv@Base 5.0.3
_ZN4QMapI7QString8QVariantE6insertERKS0_RKS1_@Base 5.0.3
_ZN4QMapI7QString8QVariantEC1ERKS2_@Base 5.0.3
_ZN4QMapI7QString8QVariantEC2ERKS2_@Base 5.0.3
_ZN4QMapI7QStringN3Dtk4Core20DDesktopEntrySectionEE13detach_helperEv@Base 5.0.3
_ZN4QMapI7QStringN3Dtk4Core20DDesktopEntrySectionEED1Ev@Base 5.0.3
_ZN4QMapI7QStringN3Dtk4Core20DDesktopEntrySectionEED2Ev@Base 5.0.3
_ZN4QMapI7QStringN3Dtk4Core20DDesktopEntrySectionEEixERKS0_@Base 5.0.3
_ZN4QMapI7QStringPN3Dtk4Core12DFileWatcherEE13detach_helperEv@Base 5.0.3
_ZN4QMapI7QStringS0_E13detach_helperEv@Base 5.0.3
_ZN4QMapI7QStringS0_E6removeERKS0_@Base 5.0.3
_ZN4QMapI7QStringS0_EC1ERKS1_@Base 5.0.3
_ZN4QMapI7QStringS0_EC2ERKS1_@Base 5.0.3
_ZN4QMapI7QStringS0_ED1Ev@Base 5.0.3
_ZN4QMapI7QStringS0_ED2Ev@Base 5.0.3
_ZN4QMapI7QStringS0_EixERKS0_@Base 5.0.3
_ZN4QMapI7QStringiE13detach_helperEv@Base 5.0.3
_ZN4QMapI7QStringiED1Ev@Base 5.0.3
_ZN4QMapI7QStringiED2Ev@Base 5.0.3
_ZN4QMapI9QDateTime7QStringED1Ev@Base 5.0.3
_ZN4QMapI9QDateTime7QStringED2Ev@Base 5.0.3
_ZN4QMapIPKvPyE13detach_helperEv@Base 5.0.3
_ZN4QMapIPKvPyED1Ev@Base 5.0.3
_ZN4QMapIPKvPyED2Ev@Base 5.0.3
_ZN4QMapIPKvyE13detach_helperEv@Base 5.0.3
_ZN4QMapIPKvyED1Ev@Base 5.0.3
_ZN4QMapIPKvyED2Ev@Base 5.0.3
_ZN4QMapIPPyS0_E13detach_helperEv@Base 5.0.3
_ZN4QMapIPPyS0_ED1Ev@Base 5.0.3
_ZN4QMapIPPyS0_ED2Ev@Base 5.0.3
_ZN4QMapIi7QStringED1Ev@Base 5.0.3
_ZN4QMapIi7QStringED2Ev@Base 5.0.3
_ZN5QHashI5QCharS0_E11deleteNode2EPN9QHashData4NodeE@Base 5.0.3
_ZN5QHashI5QCharS0_E13duplicateNodeEPN9QHashData4NodeEPv@Base 5.0.3
_ZN5QHashI5QCharS0_E6insertERKS0_S3_@Base 5.0.3
_ZN5QHashI5QCharS0_ED1Ev@Base 5.0.3
_ZN5QHashI5QCharS0_ED2Ev@Base 5.0.3
_ZN5QHashI7QString5QPairISt8functionIF8QVariantS0_EES0_EE11deleteNode2EPN9QHashData4NodeE@Base 5.0.3
_ZN5QHashI7QString5QPairISt8functionIF8QVariantS0_EES0_EE13duplicateNodeEPN9QHashData4NodeEPv@Base 5.0.3
_ZN5QHashI7QStringiE11deleteNode2EPN9QHashData4NodeE@Base 5.0.3
_ZN5QHashI7QStringiE13duplicateNodeEPN9QHashData4NodeEPv@Base 5.0.3
_ZN5QHashIPN3Dtk4Core16AbstractAppenderE15QHashDummyValueE11deleteNode2EPN9QHashData4NodeE@Base 5.0.3
_ZN5QHashIPN3Dtk4Core16AbstractAppenderE15QHashDummyValueE13duplicateNodeEPN9QHashData4NodeEPv@Base 5.0.3
_ZN5QHashIPN3Dtk4Core16AbstractAppenderE15QHashDummyValueED1Ev@Base 5.0.3
_ZN5QHashIPN3Dtk4Core16AbstractAppenderE15QHashDummyValueED2Ev@Base 5.0.3
_ZN5QHashIi15QHashDummyValueE11deleteNode2EPN9QHashData4NodeE@Base 5.0.3
_ZN5QHashIi15QHashDummyValueE13duplicateNodeEPN9QHashData4NodeEPv@Base 5.0.3
_ZN5QHashIi7QStringE11deleteNode2EPN9QHashData4NodeE@Base 5.0.3
_ZN5QHashIi7QStringE13duplicateNodeEPN9QHashData4NodeEPv@Base 5.0.3
_ZN5QHashIi7QStringE5eraseENS1_14const_iteratorE@Base 5.0.3
_ZN5QHashIi7QStringED1Ev@Base 5.0.3
_ZN5QHashIi7QStringED2Ev@Base 5.0.3
_ZN5QHashIj7QStringE11deleteNode2EPN9QHashData4NodeE@Base 5.0.3
_ZN5QHashIj7QStringE13duplicateNodeEPN9QHashData4NodeEPv@Base 5.0.3
_ZN5QHashIj7QStringED1Ev@Base 5.0.3
_ZN5QHashIj7QStringED2Ev@Base 5.0.3
_ZN5QListI10QByteArrayED1Ev@Base 5.0.3
_ZN5QListI10QByteArrayED2Ev@Base 5.0.3
_ZN5QListI4QUrlE13detach_helperEi@Base 5.0.3
_ZN5QListI4QUrlE18detach_helper_growEii@Base 5.0.3
_ZN5QListI4QUrlE6appendERKS0_@Base 5.0.3
_ZN5QListI4QUrlEC1ERKS1_@Base 5.0.3
_ZN5QListI4QUrlEC2ERKS1_@Base 5.0.3
_ZN5QListI4QUrlED1Ev@Base 5.0.3
_ZN5QListI4QUrlED2Ev@Base 5.0.3
_ZN5QListI5QPairI7QStringiEE13detach_helperEi@Base 5.0.3
_ZN5QListI5QPairI7QStringiEE18detach_helper_growEii@Base 5.0.3
_ZN5QListI5QPairI7QStringiEE6appendERKS2_@Base 5.0.3
_ZN5QListI5QPairI7QStringiEED1Ev@Base 5.0.3
_ZN5QListI5QPairI7QStringiEED2Ev@Base 5.0.3
_ZN5QListI5QPairIdiEE18detach_helper_growEii@Base 5.0.3
_ZN5QListI5QPairIdiEE6appendERKS1_@Base 5.0.3
_ZN5QListI5QPairIdiEED1Ev@Base 5.0.3
_ZN5QListI5QPairIdiEED2Ev@Base 5.0.3
_ZN5QListI7QStringE13detach_helperEi@Base 5.0.3
_ZN5QListI7QStringE18detach_helper_growEii@Base 5.0.3
_ZN5QListI7QStringE6appendERKS0_@Base 5.0.3
_ZN5QListI7QStringE7reserveEi@Base 5.0.3
_ZN5QListI7QStringE9removeAllERKS0_@Base 5.0.3
_ZN5QListI7QStringEC1ERKS1_@Base 5.0.3
_ZN5QListI7QStringEC2ERKS1_@Base 5.0.3
_ZN5QListI7QStringED1Ev@Base 5.0.3
_ZN5QListI7QStringED2Ev@Base 5.0.3
_ZN5QListI8QPointerIN3Dtk4Core14DSettingsGroupEEE13detach_helperEi@Base 5.0.3
_ZN5QListI8QPointerIN3Dtk4Core14DSettingsGroupEEE18detach_helper_growEii@Base 5.0.3
_ZN5QListI8QPointerIN3Dtk4Core14DSettingsGroupEEE6appendERKS4_@Base 5.0.3
_ZN5QListI8QPointerIN3Dtk4Core15DSettingsOptionEEE13detach_helperEi@Base 5.0.3
_ZN5QListI8QPointerIN3Dtk4Core15DSettingsOptionEEE18detach_helper_growEii@Base 5.0.3
_ZN5QListI8QPointerIN3Dtk4Core15DSettingsOptionEEE6appendERKS4_@Base 5.0.3
_ZN5QListI8QPointerIN3Dtk4Core15DSettingsOptionEEED1Ev@Base 5.0.3
_ZN5QListI8QPointerIN3Dtk4Core15DSettingsOptionEEED2Ev@Base 5.0.3
_ZN5QListI8QVariantE13detach_helperEi@Base 5.0.3
_ZN5QListI8QVariantE18detach_helper_growEii@Base 5.0.3
_ZN5QListI8QVariantE6appendERKS0_@Base 5.0.3
_ZN5QListI8QVariantEC1ERKS1_@Base 5.0.3
_ZN5QListI8QVariantEC2ERKS1_@Base 5.0.3
_ZN5QListI8QVariantED1Ev@Base 5.0.3
_ZN5QListI8QVariantED2Ev@Base 5.0.3
_ZN5QListI9QFileInfoE13detach_helperEi@Base 5.0.3
_ZN5QListI9QFileInfoED1Ev@Base 5.0.3
_ZN5QListI9QFileInfoED2Ev@Base 5.0.3
_ZN5QListIN3Dtk4Core8DSysInfo10DeepinTypeEE13detach_helperEi@Base 5.0.3
_ZN5QListIN3Dtk4Core8DSysInfo10DeepinTypeEE18detach_helper_growEii@Base 5.0.3
_ZN5QListIN3Dtk4Core8DSysInfo10DeepinTypeEE6appendERKS3_@Base 5.0.3
_ZN5QListIN3Dtk4Core8DSysInfo10DeepinTypeEED1Ev@Base 5.0.3
_ZN5QListIN3Dtk4Core8DSysInfo10DeepinTypeEED2Ev@Base 5.0.3
_ZN5QListIP13inotify_eventE13detach_helperEi@Base 5.0.3
_ZN5QListIP13inotify_eventE18detach_helper_growEii@Base 5.0.3
_ZN5QListIP13inotify_eventE6appendERKS1_@Base 5.0.3
_ZN5QListIP13inotify_eventED1Ev@Base 5.0.3
_ZN5QListIP13inotify_eventED2Ev@Base 5.0.3
_ZN5QListIPN3Dtk4Core16AbstractAppenderEE18detach_helper_growEii@Base 5.0.3
_ZN5QListIPN3Dtk4Core16AbstractAppenderEE6appendERKS3_@Base 5.0.3
_ZN5QListIPN3Dtk4Core16AbstractAppenderEEC1ERKS4_@Base 5.0.3
_ZN5QListIPN3Dtk4Core16AbstractAppenderEEC2ERKS4_@Base 5.0.3
_ZN5QListIPN3Dtk4Core16AbstractAppenderEED1Ev@Base 5.0.3
_ZN5QListIPN3Dtk4Core16AbstractAppenderEED2Ev@Base 5.0.3
_ZN5QListIPN3Dtk4Core16DBaseFileWatcherEE13detach_helperEi@Base 5.0.3
_ZN5QListIPN3Dtk4Core16DBaseFileWatcherEE18detach_helper_growEii@Base 5.0.3
_ZN5QListIPN3Dtk4Core16DBaseFileWatcherEE6appendERKS3_@Base 5.0.3
_ZN5QListIPN3Dtk4Core16DBaseFileWatcherEE9removeOneERKS3_@Base 5.0.3
_ZN5QListIPN3Dtk4Core16DBaseFileWatcherEED1Ev@Base 5.0.3
_ZN5QListIPN3Dtk4Core16DBaseFileWatcherEED2Ev@Base 5.0.3
_ZN5QPairISt8functionIF8QVariant7QStringEES2_ED1Ev@Base 5.0.3
_ZN5QPairISt8functionIF8QVariant7QStringEES2_ED2Ev@Base 5.0.3
_ZN7QStringC1EPKc@Base 5.0.3
_ZN7QStringC2EPKc@Base 5.0.3
_ZN7QStringD1Ev@Base 5.0.3
_ZN7QStringD2Ev@Base 5.0.3
_ZN8QMapDataI7QStringN3Dtk4Core20DDesktopEntrySectionEE10createNodeERKS0_RKS3_P8QMapNodeIS0_S3_Eb@Base 5.0.3
_ZN8QMapDataI7QStringPN3Dtk4Core12DFileWatcherEE7destroyEv@Base 5.0.3
_ZN8QMapDataI7QStringPN3Dtk4Core16AbstractAppenderEE7destroyEv@Base 5.0.3
_ZN8QMapDataI7QStringbE7destroyEv@Base 5.0.3
_ZN8QMapDataI7QStringiE7destroyEv@Base 5.0.3
_ZN8QMapDataI9QDateTime7QStringE7destroyEv@Base 5.0.3
_ZN8QMapDataIi7QStringE7destroyEv@Base 5.0.3
_ZN8QMapNodeI7QString5QPairIS0_yEE14destroySubTreeEv@Base 5.0.3
_ZN8QMapNodeI7QString8QPointerIN3Dtk4Core14DSettingsGroupEEE14destroySubTreeEv@Base 5.0.3
_ZN8QMapNodeI7QString8QPointerIN3Dtk4Core15DSettingsOptionEEE14destroySubTreeEv@Base 5.0.3
_ZN8QMapNodeI7QString8QVariantE14destroySubTreeEv@Base 5.0.3
_ZN8QMapNodeI7QStringN3Dtk4Core20DDesktopEntrySectionEE14destroySubTreeEv@Base 5.0.3
_ZN8QMapNodeI7QStringPN3Dtk4Core12DFileWatcherEE14destroySubTreeEv@Base 5.0.3
_ZN8QMapNodeI7QStringPN3Dtk4Core16AbstractAppenderEE14destroySubTreeEv@Base 5.0.3
_ZN8QMapNodeI7QStringS0_E14destroySubTreeEv@Base 5.0.3
_ZN8QMapNodeI7QStringbE14destroySubTreeEv@Base 5.0.3
_ZN8QMapNodeI7QStringiE14destroySubTreeEv@Base 5.0.3
_ZN8QMapNodeI9QDateTime7QStringE14destroySubTreeEv@Base 5.0.3
_ZN8QMapNodeIi7QStringE14destroySubTreeEv@Base 5.0.3
_ZN9DDBusDataC1Ev@Base 5.0.3
_ZN9DDBusDataC2Ev@Base 5.0.3
_ZN9QtPrivate11QSlotObjectIMN3Dtk4Core12DFileWatcherEFvRK7QStringS6_ENS_4ListIJS6_S6_EEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb@Base 5.0.3
_ZN9QtPrivate11QSlotObjectIMN3Dtk4Core12DFileWatcherEFvRK7QStringS6_S6_S6_ENS_4ListIJS6_S6_S6_S6_EEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb@Base 5.0.3
_ZN9QtPrivate11QSlotObjectIMN3Dtk4Core16DSettingsBackendEFvRK7QStringRK8QVariantENS_4ListIJS6_S9_EEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb@Base 5.0.3
_ZN9QtPrivate11QSlotObjectIMN3Dtk4Core16DSettingsBackendEFvvENS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb@Base 5.0.3
_ZN9QtPrivate8RefCount3refEv@Base 5.0.3
_ZNK3Dtk4Core12DFileWatcher10metaObjectEv@Base 5.0.3
_ZNK3Dtk4Core12FileAppender4sizeEv@Base 5.0.3
_ZNK3Dtk4Core12FileAppender8fileNameEv@Base 5.0.3
_ZNK3Dtk4Core13DDesktopEntry11genericNameEv@Base 5.0.3
_ZNK3Dtk4Core13DDesktopEntry11stringValueERK7QStringS4_S4_@Base 5.0.3
_ZNK3Dtk4Core13DDesktopEntry14ddeDisplayNameEv@Base 5.0.3
_ZNK3Dtk4Core13DDesktopEntry14localizedValueERK7QStringRK7QLocaleS4_S4_@Base 5.0.3
_ZNK3Dtk4Core13DDesktopEntry14localizedValueERK7QStringS4_S4_S4_@Base 5.0.3
_ZNK3Dtk4Core13DDesktopEntry15stringListValueERK7QStringS4_@Base 5.0.3
_ZNK3Dtk4Core13DDesktopEntry4keysERK7QString@Base 5.0.3
_ZNK3Dtk4Core13DDesktopEntry4nameEv@Base 5.0.3
_ZNK3Dtk4Core13DDesktopEntry4saveEv@Base 5.0.3
_ZNK3Dtk4Core13DDesktopEntry6statusEv@Base 5.0.3
_ZNK3Dtk4Core13DDesktopEntry7commentEv@Base 5.0.3
_ZNK3Dtk4Core13DDesktopEntry8containsERK7QStringS4_@Base 5.0.3
_ZNK3Dtk4Core13DDesktopEntry8rawValueERK7QStringS4_S4_@Base 5.0.3
_ZNK3Dtk4Core13DDesktopEntry9allGroupsEb@Base 5.0.3
_ZNK3Dtk4Core13DTrashManager12trashIsEmptyEv@Base 5.0.3
_ZNK3Dtk4Core14DSettingsGroup10childGroupERK7QString@Base 5.0.3
_ZNK3Dtk4Core14DSettingsGroup10metaObjectEv@Base 5.0.3
_ZNK3Dtk4Core14DSettingsGroup11childGroupsEv@Base 5.0.3
_ZNK3Dtk4Core14DSettingsGroup11parentGroupEv@Base 5.0.3
_ZNK3Dtk4Core14DSettingsGroup12childOptionsEv@Base 5.0.3
_ZNK3Dtk4Core14DSettingsGroup3keyEv@Base 5.0.3
_ZNK3Dtk4Core14DSettingsGroup4nameEv@Base 5.0.3
_ZNK3Dtk4Core14DSettingsGroup6optionERK7QString@Base 5.0.3
_ZNK3Dtk4Core14DSettingsGroup7optionsEv@Base 5.0.3
_ZNK3Dtk4Core14DSettingsGroup8isHiddenEv@Base 5.0.3
_ZNK3Dtk4Core15ConsoleAppender6formatEv@Base 5.0.3
_ZNK3Dtk4Core15DSettingsOption10metaObjectEv@Base 5.0.3
_ZNK3Dtk4Core15DSettingsOption11parentGroupEv@Base 5.0.3
_ZNK3Dtk4Core15DSettingsOption12defaultValueEv@Base 5.0.3
_ZNK3Dtk4Core15DSettingsOption3keyEv@Base 5.0.3
_ZNK3Dtk4Core15DSettingsOption4dataERK7QString@Base 5.0.3
_ZNK3Dtk4Core15DSettingsOption4nameEv@Base 5.0.3
_ZNK3Dtk4Core15DSettingsOption5valueEv@Base 5.0.3
_ZNK3Dtk4Core15DSettingsOption8canResetEv@Base 5.0.3
_ZNK3Dtk4Core15DSettingsOption8isHiddenEv@Base 5.0.3
_ZNK3Dtk4Core15DSettingsOption8viewTypeEv@Base 5.0.3
_ZNK3Dtk4Core15QSettingBackend10metaObjectEv@Base 5.0.3
_ZNK3Dtk4Core15QSettingBackend4keysEv@Base 5.0.3
_ZNK3Dtk4Core15QSettingBackend9getOptionERK7QString@Base 5.0.3
_ZNK3Dtk4Core16AbstractAppender12detailsLevelEv@Base 5.0.3
_ZNK3Dtk4Core16DBaseFileWatcher10metaObjectEv@Base 5.0.3
_ZNK3Dtk4Core16DBaseFileWatcher7fileUrlEv@Base 5.0.3
_ZNK3Dtk4Core16DSettingsBackend10metaObjectEv@Base 5.0.3
_ZNK3Dtk4Core16GSettingsBackend10metaObjectEv@Base 5.0.3
_ZNK3Dtk4Core16GSettingsBackend4keysEv@Base 5.0.3
_ZNK3Dtk4Core16GSettingsBackend9getOptionERK7QString@Base 5.0.3
_ZNK3Dtk4Core17CuteMessageLogger5writeEPKcz@Base 5.0.3
_ZNK3Dtk4Core17CuteMessageLogger5writeERK7QString@Base 5.0.3
_ZNK3Dtk4Core17CuteMessageLogger5writeEv@Base 5.0.3
_ZNK3Dtk4Core18DDiskSizeFormatter15unitConvertRateEi@Base 5.0.3
_ZNK3Dtk4Core18DDiskSizeFormatter7unitMaxEv@Base 5.0.3
_ZNK3Dtk4Core18DDiskSizeFormatter7unitMinEv@Base 5.0.3
_ZNK3Dtk4Core18DDiskSizeFormatter7unitStrEi@Base 5.0.3
_ZNK3Dtk4Core18DFileSystemWatcher10metaObjectEv@Base 5.0.3
_ZNK3Dtk4Core18DFileSystemWatcher11directoriesEv@Base 5.0.3
_ZNK3Dtk4Core18DFileSystemWatcher5filesEv@Base 5.0.3
_ZNK3Dtk4Core18DTimeUnitFormatter15unitConvertRateEi@Base 5.0.3
_ZNK3Dtk4Core18DTimeUnitFormatter7unitMaxEv@Base 5.0.3
_ZNK3Dtk4Core18DTimeUnitFormatter7unitMinEv@Base 5.0.3
_ZNK3Dtk4Core18DTimeUnitFormatter7unitStrEi@Base 5.0.3
_ZNK3Dtk4Core19DFileWatcherManager10metaObjectEv@Base 5.0.3
_ZNK3Dtk4Core19RollingFileAppender11datePatternEv@Base 5.0.3
_ZNK3Dtk4Core19RollingFileAppender13logFilesLimitEv@Base 5.0.3
_ZNK3Dtk4Core19RollingFileAppender17datePatternStringEv@Base 5.0.3
_ZNK3Dtk4Core20DDesktopEntryPrivate10isWritableEv@Base 5.0.3
_ZNK3Dtk4Core20DDesktopEntryPrivate10sectionPosERK7QString@Base 5.0.3
_ZNK3Dtk4Core20DDesktopEntryPrivate4keysERK7QString@Base 5.0.3
_ZNK3Dtk4Core20DDesktopEntryPrivate5writeER9QIODevice@Base 5.0.3
_ZNK3Dtk4Core20DDesktopEntryPrivate8containsERK7QStringS4_@Base 5.0.3
_ZNK3Dtk4Core20DDesktopEntryPrivate9setStatusERKNS0_13DDesktopEntry6StatusE@Base 5.0.3
_ZNK3Dtk4Core22AbstractStringAppender15formattedStringERK9QDateTimeNS0_6Logger8LogLevelEPKciS8_RK7QStringSB_@Base 5.0.3
_ZNK3Dtk4Core22AbstractStringAppender6formatEv@Base 5.0.3
_ZNK3Dtk4Core22DAbstractUnitFormatter12unitValueMaxEi@Base 5.0.3
_ZNK3Dtk4Core22DAbstractUnitFormatter12unitValueMinEi@Base 5.0.3
_ZNK3Dtk4Core22DAbstractUnitFormatter16formatAsUnitListEdi@Base 5.0.3
_ZNK3Dtk4Core22DAbstractUnitFormatter6formatEdi@Base 5.0.3
_ZNK3Dtk4Core22DAbstractUnitFormatter8formatAsEdii@Base 5.0.3
_ZNK3Dtk4Core5DUtil18DExportedInterface10metaObjectEv@Base 5.0.3
_ZNK3Dtk4Core5DUtil18DExportedInterface6invokeERK7QStringS5_@Base 5.0.3
_ZNK3Dtk4Core5DUtil31DExportedInterfaceDBusInterface10metaObjectEv@Base 5.0.3
_ZNK3Dtk4Core6Logger15defaultCategoryEv@Base 5.0.3
_ZNK3Dtk4Core9DSettings10metaObjectEv@Base 5.0.3
_ZNK3Dtk4Core9DSettings4keysEv@Base 5.0.3
_ZNK3Dtk4Core9DSettings4metaEv@Base 5.0.3
_ZNK3Dtk4Core9DSettings5groupERK7QString@Base 5.0.3
_ZNK3Dtk4Core9DSettings5valueERK7QString@Base 5.0.3
_ZNK3Dtk4Core9DSettings6groupsEv@Base 5.0.3
_ZNK3Dtk4Core9DSettings6optionERK7QString@Base 5.0.3
_ZNK3Dtk4Core9DSettings7optionsEv@Base 5.0.3
_ZNK3Dtk4Core9DSettings9getOptionERK7QString@Base 5.0.3
_ZNK3Dtk4Core9DSettings9groupKeysEv@Base 5.0.3
_ZNK4QMapI7QString8QPointerIN3Dtk4Core15DSettingsOptionEEE6valuesEv@Base 5.0.3
_ZNK4QMapI7QStringN3Dtk4Core20DDesktopEntrySectionEE4keysEv@Base 5.0.3
_ZNK4QMapIi7QStringE6valuesERKi@Base 5.0.3
_ZNK5QHashI5QCharS0_E8findNodeERKS0_Pj@Base 5.0.3
_ZNK5QHashI7QString5QPairISt8functionIF8QVariantS0_EES0_EE4keysEv@Base 5.0.3
_ZNK5QHashI7QString5QPairISt8functionIF8QVariantS0_EES0_EE8findNodeERKS0_Pj@Base 5.0.3
_ZNK5QHashI7QString5QPairISt8functionIF8QVariantS0_EES0_EE8findNodeERKS0_j@Base 5.0.3
_ZNK5QHashI7QStringiE8findNodeERKS0_Pj@Base 5.0.3
_ZNK5QHashI7QStringiE8findNodeERKS0_j@Base 5.0.3
_ZNK5QHashIPN3Dtk4Core16AbstractAppenderE15QHashDummyValueE8findNodeERKS3_Pj@Base 5.0.3
_ZNK5QHashIi15QHashDummyValueE8findNodeERKiPj@Base 5.0.3
_ZNK5QHashIi7QStringE6valuesERKi@Base 5.0.3
_ZNK5QHashIi7QStringE8findNodeERKiPj@Base 5.0.3
_ZNK5QHashIj7QStringE8findNodeERKjPj@Base 5.0.3
_ZNK5QListIPN3Dtk4Core16AbstractAppenderEE5toSetEv@Base 5.0.3
_ZNK8QMapDataI7QString8QPointerIN3Dtk4Core14DSettingsGroupEEE8findNodeERKS0_@Base 5.0.3
_ZNK8QMapDataI7QString8QPointerIN3Dtk4Core15DSettingsOptionEEE8findNodeERKS0_@Base 5.0.3
_ZNK8QMapDataI7QString8QVariantE8findNodeERKS0_@Base 5.0.3
_ZNK8QMapDataI7QStringN3Dtk4Core20DDesktopEntrySectionEE8findNodeERKS0_@Base 5.0.3
_ZNK8QMapDataI7QStringPN3Dtk4Core12DFileWatcherEE8findNodeERKS0_@Base 5.0.3
_ZNK8QMapDataI7QStringPN3Dtk4Core16AbstractAppenderEE8findNodeERKS0_@Base 5.0.3
_ZNK8QMapDataI7QStringS0_E8findNodeERKS0_@Base 5.0.3
_ZNK8QMapDataI7QStringiE8findNodeERKS0_@Base 5.0.3
_ZNK8QMapDataIPKvPyE8findNodeERKS1_@Base 5.0.3
_ZNK8QMapDataIPKvyE8findNodeERKS1_@Base 5.0.3
_ZNK8QMapNodeI7QString5QPairIS0_yEE4copyEP8QMapDataIS0_S2_E@Base 5.0.3
_ZNK8QMapNodeI7QString8QPointerIN3Dtk4Core14DSettingsGroupEEE4copyEP8QMapDataIS0_S5_E@Base 5.0.3
_ZNK8QMapNodeI7QString8QPointerIN3Dtk4Core15DSettingsOptionEEE4copyEP8QMapDataIS0_S5_E@Base 5.0.3
_ZNK8QMapNodeI7QString8QVariantE4copyEP8QMapDataIS0_S1_E@Base 5.0.3
_ZNK8QMapNodeI7QStringN3Dtk4Core20DDesktopEntrySectionEE4copyEP8QMapDataIS0_S3_E@Base 5.0.3
_ZNK8QMapNodeI7QStringPN3Dtk4Core12DFileWatcherEE4copyEP8QMapDataIS0_S4_E@Base 5.0.3
_ZNK8QMapNodeI7QStringPN3Dtk4Core16AbstractAppenderEE4copyEP8QMapDataIS0_S4_E@Base 5.0.3
_ZNK8QMapNodeI7QStringS0_E4copyEP8QMapDataIS0_S0_E@Base 5.0.3
_ZNK8QMapNodeI7QStringbE4copyEP8QMapDataIS0_bE@Base 5.0.3
_ZNK8QMapNodeI7QStringiE4copyEP8QMapDataIS0_iE@Base 5.0.3
_ZNK8QMapNodeI9QDateTime7QStringE4copyEP8QMapDataIS0_S1_E@Base 5.0.3
_ZNK8QMapNodeIPKvPyE4copyEP8QMapDataIS1_S2_E@Base 5.0.3
_ZNK8QMapNodeIPKvyE4copyEP8QMapDataIS1_yE@Base 5.0.3
_ZNK8QMapNodeIPPyS0_E4copyEP8QMapDataIS1_S0_E@Base 5.0.3
_ZNK8QMapNodeIi7QStringE4copyEP8QMapDataIiS0_E@Base 5.0.3
_ZNKSt5ctypeIcE8do_widenEc@Base 5.0.3
_ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv@Base 5.0.3
_ZNSt23_Sp_counted_ptr_inplaceI9DDBusDataSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv@Base 5.0.3
_ZNSt23_Sp_counted_ptr_inplaceI9DDBusDataSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv@Base 5.0.3
_ZNSt23_Sp_counted_ptr_inplaceI9DDBusDataSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info@Base 5.0.3
_ZNSt23_Sp_counted_ptr_inplaceI9DDBusDataSaIS0_ELN9__gnu_cxx12_Lock_policyE2EED0Ev@Base 5.0.3
_ZNSt23_Sp_counted_ptr_inplaceI9DDBusDataSaIS0_ELN9__gnu_cxx12_Lock_policyE2EED1Ev@Base 5.0.3
_ZNSt23_Sp_counted_ptr_inplaceI9DDBusDataSaIS0_ELN9__gnu_cxx12_Lock_policyE2EED2Ev@Base 5.0.3
_ZNSt23_Sp_counted_ptr_inplaceIN3Dtk4Core5DUtil11DNotifyDataESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE10_M_destroyEv@Base 5.0.3
_ZNSt23_Sp_counted_ptr_inplaceIN3Dtk4Core5DUtil11DNotifyDataESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv@Base 5.0.3
_ZNSt23_Sp_counted_ptr_inplaceIN3Dtk4Core5DUtil11DNotifyDataESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info@Base 5.0.3
_ZNSt23_Sp_counted_ptr_inplaceIN3Dtk4Core5DUtil11DNotifyDataESaIS3_ELN9__gnu_cxx12_Lock_policyE2EED0Ev@Base 5.0.3
_ZNSt23_Sp_counted_ptr_inplaceIN3Dtk4Core5DUtil11DNotifyDataESaIS3_ELN9__gnu_cxx12_Lock_policyE2EED1Ev@Base 5.0.3
_ZNSt23_Sp_counted_ptr_inplaceIN3Dtk4Core5DUtil11DNotifyDataESaIS3_ELN9__gnu_cxx12_Lock_policyE2EED2Ev@Base 5.0.3
_ZNSt8functionIF8QVariant7QStringEEC1ERKS3_@Base 5.0.3
_ZNSt8functionIF8QVariant7QStringEEC2ERKS3_@Base 5.0.3
_ZSt9__find_ifIPK7QStringN9__gnu_cxx5__ops16_Iter_equals_valIS1_EEET_S7_S7_T0_St26random_access_iterator_tag@Base 5.0.3
_ZTI12QDBusContext@Base 5.0.3
_ZTIN3Dtk4Core12DFileWatcherE@Base 5.0.3
_ZTIN3Dtk4Core12FileAppenderE@Base 5.0.3
_ZTIN3Dtk4Core13DTrashManagerE@Base 5.0.3
_ZTIN3Dtk4Core14DObjectPrivateE@Base 5.0.3
_ZTIN3Dtk4Core14DSettingsGroupE@Base 5.0.3
_ZTIN3Dtk4Core14DTrashManager_E@Base 5.0.3
_ZTIN3Dtk4Core15ConsoleAppenderE@Base 5.0.3
_ZTIN3Dtk4Core15DSettingsOptionE@Base 5.0.3
_ZTIN3Dtk4Core15QSettingBackendE@Base 5.0.3
_ZTIN3Dtk4Core16AbstractAppenderE@Base 5.0.3
_ZTIN3Dtk4Core16DBaseFileWatcherE@Base 5.0.3
_ZTIN3Dtk4Core16DSettingsBackendE@Base 5.0.3
_ZTIN3Dtk4Core16GSettingsBackendE@Base 5.0.3
_ZTIN3Dtk4Core18DDiskSizeFormatterE@Base 5.0.3
_ZTIN3Dtk4Core18DFileSystemWatcherE@Base 5.0.3
_ZTIN3Dtk4Core18DTimeUnitFormatterE@Base 5.0.3
_ZTIN3Dtk4Core19DFileWatcherManagerE@Base 5.0.3
_ZTIN3Dtk4Core19DFileWatcherPrivateE@Base 5.0.3
_ZTIN3Dtk4Core19RollingFileAppenderE@Base 5.0.3
_ZTIN3Dtk4Core20DTrashManagerPrivateE@Base 5.0.3
_ZTIN3Dtk4Core22AbstractStringAppenderE@Base 5.0.3
_ZTIN3Dtk4Core22DAbstractUnitFormatterE@Base 5.0.3
_ZTIN3Dtk4Core23DBaseFileWatcherPrivateE@Base 5.0.3
_ZTIN3Dtk4Core25DFileSystemWatcherPrivateE@Base 5.0.3
_ZTIN3Dtk4Core26DFileWatcherManagerPrivateE@Base 5.0.3
_ZTIN3Dtk4Core5DUtil18DExportedInterfaceE@Base 5.0.3
_ZTIN3Dtk4Core5DUtil25DExportedInterfacePrivateE@Base 5.0.3
_ZTIN3Dtk4Core5DUtil31DExportedInterfaceDBusInterfaceE@Base 5.0.3
_ZTIN3Dtk4Core7DObjectE@Base 5.0.3
_ZTIN3Dtk4Core9DSettingsE@Base 5.0.3
_ZTIN3Dtk4Core9LogDeviceE@Base 5.0.3
_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE@Base 5.0.3
_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE@Base 5.0.3
_ZTISt23_Sp_counted_ptr_inplaceI9DDBusDataSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE@Base 5.0.3
_ZTISt23_Sp_counted_ptr_inplaceIN3Dtk4Core5DUtil11DNotifyDataESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE@Base 5.0.3
_ZTS12QDBusContext@Base 5.0.3
_ZTSN3Dtk4Core12DFileWatcherE@Base 5.0.3
_ZTSN3Dtk4Core12FileAppenderE@Base 5.0.3
_ZTSN3Dtk4Core13DTrashManagerE@Base 5.0.3
_ZTSN3Dtk4Core14DObjectPrivateE@Base 5.0.3
_ZTSN3Dtk4Core14DSettingsGroupE@Base 5.0.3
_ZTSN3Dtk4Core14DTrashManager_E@Base 5.0.3
_ZTSN3Dtk4Core15ConsoleAppenderE@Base 5.0.3
_ZTSN3Dtk4Core15DSettingsOptionE@Base 5.0.3
_ZTSN3Dtk4Core15QSettingBackendE@Base 5.0.3
_ZTSN3Dtk4Core16AbstractAppenderE@Base 5.0.3
_ZTSN3Dtk4Core16DBaseFileWatcherE@Base 5.0.3
_ZTSN3Dtk4Core16DSettingsBackendE@Base 5.0.3
_ZTSN3Dtk4Core16GSettingsBackendE@Base 5.0.3
_ZTSN3Dtk4Core18DDiskSizeFormatterE@Base 5.0.3
_ZTSN3Dtk4Core18DFileSystemWatcherE@Base 5.0.3
_ZTSN3Dtk4Core18DTimeUnitFormatterE@Base 5.0.3
_ZTSN3Dtk4Core19DFileWatcherManagerE@Base 5.0.3
_ZTSN3Dtk4Core19DFileWatcherPrivateE@Base 5.0.3
_ZTSN3Dtk4Core19RollingFileAppenderE@Base 5.0.3
_ZTSN3Dtk4Core20DTrashManagerPrivateE@Base 5.0.3
_ZTSN3Dtk4Core22AbstractStringAppenderE@Base 5.0.3
_ZTSN3Dtk4Core22DAbstractUnitFormatterE@Base 5.0.3
_ZTSN3Dtk4Core23DBaseFileWatcherPrivateE@Base 5.0.3
_ZTSN3Dtk4Core25DFileSystemWatcherPrivateE@Base 5.0.3
_ZTSN3Dtk4Core26DFileWatcherManagerPrivateE@Base 5.0.3
_ZTSN3Dtk4Core5DUtil18DExportedInterfaceE@Base 5.0.3
_ZTSN3Dtk4Core5DUtil25DExportedInterfacePrivateE@Base 5.0.3
_ZTSN3Dtk4Core5DUtil31DExportedInterfaceDBusInterfaceE@Base 5.0.3
_ZTSN3Dtk4Core7DObjectE@Base 5.0.3
_ZTSN3Dtk4Core9DSettingsE@Base 5.0.3
_ZTSN3Dtk4Core9LogDeviceE@Base 5.0.3
_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE@Base 5.0.3
_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE@Base 5.0.3
_ZTSSt19_Sp_make_shared_tag@Base 5.0.3
_ZTSSt23_Sp_counted_ptr_inplaceI9DDBusDataSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE@Base 5.0.3
_ZTSSt23_Sp_counted_ptr_inplaceIN3Dtk4Core5DUtil11DNotifyDataESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE@Base 5.0.3
_ZTVN3Dtk4Core12DFileWatcherE@Base 5.0.3
_ZTVN3Dtk4Core12FileAppenderE@Base 5.0.3
_ZTVN3Dtk4Core13DTrashManagerE@Base 5.0.3
_ZTVN3Dtk4Core14DObjectPrivateE@Base 5.0.3
_ZTVN3Dtk4Core14DSettingsGroupE@Base 5.0.3
_ZTVN3Dtk4Core14DTrashManager_E@Base 5.0.3
_ZTVN3Dtk4Core15ConsoleAppenderE@Base 5.0.3
_ZTVN3Dtk4Core15DSettingsOptionE@Base 5.0.3
_ZTVN3Dtk4Core15QSettingBackendE@Base 5.0.3
_ZTVN3Dtk4Core16AbstractAppenderE@Base 5.0.3
_ZTVN3Dtk4Core16DBaseFileWatcherE@Base 5.0.3
_ZTVN3Dtk4Core16DSettingsBackendE@Base 5.0.3
_ZTVN3Dtk4Core16GSettingsBackendE@Base 5.0.3
_ZTVN3Dtk4Core18DDiskSizeFormatterE@Base 5.0.3
_ZTVN3Dtk4Core18DFileSystemWatcherE@Base 5.0.3
_ZTVN3Dtk4Core18DTimeUnitFormatterE@Base 5.0.3
_ZTVN3Dtk4Core19DFileWatcherManagerE@Base 5.0.3
_ZTVN3Dtk4Core19DFileWatcherPrivateE@Base 5.0.3
_ZTVN3Dtk4Core19RollingFileAppenderE@Base 5.0.3
_ZTVN3Dtk4Core20DTrashManagerPrivateE@Base 5.0.3
_ZTVN3Dtk4Core22AbstractStringAppenderE@Base 5.0.3
_ZTVN3Dtk4Core22DAbstractUnitFormatterE@Base 5.0.3
_ZTVN3Dtk4Core23DBaseFileWatcherPrivateE@Base 5.0.3
_ZTVN3Dtk4Core25DFileSystemWatcherPrivateE@Base 5.0.3
_ZTVN3Dtk4Core26DFileWatcherManagerPrivateE@Base 5.0.3
_ZTVN3Dtk4Core5DUtil18DExportedInterfaceE@Base 5.0.3
_ZTVN3Dtk4Core5DUtil25DExportedInterfacePrivateE@Base 5.0.3
_ZTVN3Dtk4Core5DUtil31DExportedInterfaceDBusInterfaceE@Base 5.0.3
_ZTVN3Dtk4Core7DObjectE@Base 5.0.3
_ZTVN3Dtk4Core9DSettingsE@Base 5.0.3
_ZTVN3Dtk4Core9LogDeviceE@Base 5.0.3
_ZTVSt23_Sp_counted_ptr_inplaceI9DDBusDataSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE@Base 5.0.3
_ZTVSt23_Sp_counted_ptr_inplaceIN3Dtk4Core5DUtil11DNotifyDataESaIS3_ELN9__gnu_cxx12_Lock_policyE2EE@Base 5.0.3
_ZThn16_N3Dtk4Core12DFileWatcherD0Ev@Base 5.0.3
_ZThn16_N3Dtk4Core12DFileWatcherD1Ev@Base 5.0.3
_ZThn16_N3Dtk4Core13DTrashManagerD0Ev@Base 5.0.3
_ZThn16_N3Dtk4Core13DTrashManagerD1Ev@Base 5.0.3
_ZThn16_N3Dtk4Core14DTrashManager_D0Ev@Base 5.0.3
_ZThn16_N3Dtk4Core14DTrashManager_D1Ev@Base 5.0.3
_ZThn16_N3Dtk4Core16DBaseFileWatcherD0Ev@Base 5.0.3
_ZThn16_N3Dtk4Core16DBaseFileWatcherD1Ev@Base 5.0.3
_ZThn16_N3Dtk4Core18DFileSystemWatcherD0Ev@Base 5.0.3
_ZThn16_N3Dtk4Core18DFileSystemWatcherD1Ev@Base 5.0.3
_ZThn16_N3Dtk4Core19DFileWatcherManagerD0Ev@Base 5.0.3
_ZThn16_N3Dtk4Core19DFileWatcherManagerD1Ev@Base 5.0.3
_ZThn16_N3Dtk4Core5DUtil18DExportedInterfaceD0Ev@Base 5.0.3
_ZThn16_N3Dtk4Core5DUtil18DExportedInterfaceD1Ev@Base 5.0.3
_ZZN3Dtk4Core11DLogManager8instanceEvE8instance@Base 5.0.3
_ZZN9QtPrivate15ConnectionTypesINS_4ListIJRK7QStringRK8QVariantEEELb1EE5typesEvE1t@Base 5.0.3
_ZZNSt19_Sp_make_shared_tag5_S_tiEvE5__tag@Base 5.0.3

View File

@ -1,38 +0,0 @@
cmake_minimum_required (VERSION 3.10)
find_package (Doxygen REQUIRED)
set (QCH_INSTALL_DESTINATION ${CMAKE_INSTALLL_PREFIX}/share/DDE/dtk CACHE STRING "QCH install location")
set (DOXYGEN_GENERATE_HTML "NO" CACHE STRING "Doxygen HTML output")
set (DOXYGEN_GENERATE_XML "NO" CACHE STRING "Doxygen XML output")
set (DOXYGEN_GENERATE_QHP "YES" CACHE STRING "Doxygen QHP output")
set (DOXYGEN_FILE_PATTERNS *.cpp *.h *.md *.zh_CN.dox CACHE STRING "Doxygen File Patterns")
set (DOXYGEN_PROJECT_NUMBER ${CMAKE_PROJECT_VERSION} CACHE STRING "") # Should be the same as this project is using.
set (DOXYGEN_EXTRACT_STATIC YES)
set (DOXYGEN_OUTPUT_LANGUAGE "Chinese")
set (DOXYGEN_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/docs/)
set (DOXYGEN_QHG_LOCATION "qhelpgenerator")
set (DOXYGEN_QHP_NAMESPACE "org.deepin.dtk.core")
set (DOXYGEN_QCH_FILE "dtkcore.qch")
set (DOXYGEN_QHP_VIRTUAL_FOLDER "dtkcore")
set (DOXYGEN_HTML_EXTRA_STYLESHEET "" CACHE STRING "Doxygen custom stylesheet for HTML output")
set (DOXYGEN_TAGFILES "qtcore.tags=qthelp://org.qt-project.qtcore/qtcore/" CACHE STRING "Doxygen tag files")
set (DOXYGEN_PREDEFINED
"\"DCORE_BEGIN_NAMESPACE=namespace Dtk { namespace Core {\""
"\"DCORE_END_NAMESPACE=}}\""
"\"DCORE_USE_NAMESPACE=using Dtk::Core\""
)
set (DOXYGEN_MACRO_EXPANSION "YES")
set (DOXYGEN_EXPAND_ONLY_PREDEF "YES")
doxygen_add_docs (doxygen
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/doc
ALL
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generate documentation via Doxygen"
)
install (FILES ${PROJECT_BINARY_DIR}/docs/html/dtkcore.qch DESTINATION ${QCH_INSTALL_DESTINATION})

View File

@ -1,37 +0,0 @@
/*
* Copyright (C) 2021 ~ 2021 Deepin Technology Co., Ltd.
*
* Author: Chen Bin <chenbin@uniontech.com>
*
* Maintainer: Chen Bin <chenbin@uniontech.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*!
\page dtkcore-index.html
\keyword DTK Core Reference Documentation
\title DTK Core Docs
Deepint Tool Kit (Dtk) is the base development tool of all C++/Qt Developer work on Deepin.
\list
\li \l {DTK Gui Docs}
\li \l {DTK Gui 模块}
\li \l {DTK Core 模块}
\li \l {DTK Widget Docs}
\li \l {DTK Widget 模块}
\endlist
*/

View File

@ -1,29 +0,0 @@
/*
* Copyright (C) 2021 ~ 2021 Deepin Technology Co., Ltd.
*
* Author: Chen Bin <chenbin@uniontech.com>
*
* Maintainer: Chen Bin <chenbin@uniontech.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*!
\module dtkcore
\title DTK Core 模块
\brief Deepin Tool Kit Core Devel library.
DtkCore is base devel library of Deepin Qt/C++ applications.
*/

82
docs/CMakeLists.txt Normal file
View File

@ -0,0 +1,82 @@
cmake_minimum_required (VERSION 3.10)
find_package (Doxygen REQUIRED)
set (QCH_INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/qt${QT_VERSION_MAJOR}/doc CACHE STRING "QCH install location")
set (DOXYGEN_GENERATE_HTML YES CACHE STRING "Doxygen HTML output")
set (DOXYGEN_GENERATE_XML YES CACHE STRING "Doxygen XML output")
set (DOXYGEN_GENERATE_QHP YES CACHE STRING "Doxygen QHP output")
set (DOXYGEN_FILE_PATTERNS *.cpp *.h *.zh_CN.md *.zh_CN.dox CACHE STRING "Doxygen File Patterns")
set (DOXYGEN_PROJECT_NUMBER ${CMAKE_PROJECT_VERSION} CACHE STRING "") # Should be the same as this project is using.
set (DOXYGEN_EXTRACT_STATIC YES)
set (DOXYGEN_OUTPUT_LANGUAGE "Chinese")
if("${QT_VERSION_MAJOR}" STREQUAL "5")
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Help)
else()
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS ToolsTools)
endif()
get_target_property(_qhelpgenerator_location Qt${QT_VERSION_MAJOR}::qhelpgenerator IMPORTED_LOCATION)
if("${_qhelpgenerator_location}" STREQUAL "")
set(_qhelpgenerator_location "qhelpgenerator")
endif()
set (DOXYGEN_QHG_LOCATION ${_qhelpgenerator_location} CACHE STRING "Doxygen QHG path")
set (DOXYGEN_QHP_NAMESPACE "org.deepin.dtk.core")
set (DOXYGEN_QCH_FILE "dtkcore.qch")
set (DOXYGEN_QHP_VIRTUAL_FOLDER "dtkcore")
set (DOXYGEN_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/docs/)
set (DOXYGEN_HTML_EXTRA_STYLESHEET "" CACHE STRING "Doxygen custom stylesheet for HTML output")
set (DOXYGEN_TAGFILES "qtcore.tags=qthelp://org.qt-project.qtcore/qtcore/" CACHE STRING "Doxygen tag files")
set (DOXYGEN_IMAGE_PATH ${PROJECT_SOURCE_DIR}/docs/src)
set (DOXYGEN_SOURCE_BROWSE "YES")
set (BUILD_THEME OFF CACHE BOOL "Build doxgen theme")
if(BUILD_THEME)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/doxygen-theme")
message(STATUS "doxygen-theme exists")
else()
execute_process(COMMAND git clone https://github.com/linuxdeepin/doxygen-theme.git --depth=1
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
TIMEOUT 60
)
execute_process(COMMAND bash themesetting.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/doxygen-theme/
)
endif()
set (DOXYGEN_HTML_EXTRA_STYLESHEET "docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome.css"
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-sidebar-only.css"
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-sidebar-only-darkmode-toggle.css"
)
set (DOXYGEN_HTML_EXTRA_FILES "docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js"
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js"
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-paragraph-link.js"
"docs/doxygen-theme/doxygen-awesome-css/doxygen-awesome-interactive-toc.js"
)
set (DOXYGEN_GENERATE_TREEVIEW "YES")
set (DOXYGEN_DISABLE_INDEX "NO")
set (DOXYGEN_FULL_SIDEBAR "NO")
set (DOXYGEN_HTML_HEADER "docs/doxygen-theme/doxygen-awesome-css/header.html")
set (DOXYGEN_HTML_FOOTER "docs/doxygen-theme/doxygen-awesome-css/footer.html")
endif()
set (DOXYGEN_MACRO_EXPANSION "YES")
set (DOXYGEN_PREDEFINED
"DCORE_BEGIN_NAMESPACE=namespace Dtk { namespace Core {"
"DCORE_END_NAMESPACE=}}"
"DCORE_USE_NAMESPACE=using namespace Dtk::Core;"
"Q_OS_LINUX=1"
)
set (DOXYGEN_EXPAND_ONLY_PREDEF "YES")
doxygen_add_docs (doxygen
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/docs
ALL
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generate documentation via Doxygen"
)
install (FILES ${PROJECT_BINARY_DIR}/docs/html/dtkcore.qch DESTINATION ${QCH_INSTALL_DESTINATION})

52
docs/MainPage.zh_CN.md Normal file
View File

@ -0,0 +1,52 @@
\mainpage dtkcore
@brief dtk
# dtkcore
## 简介
dtkcore 是一个基于Qt的C++库,它提供了一些常用的工具类,以及一些基础的模块,如日志、插件、网络、线程、数据库、文件、图形、音频、视频、系统信息等
## 使用
现在的dtkcore>=5.6版本使用CMake来管理各个模块所以使用dtkcore时需要先安装CMake(CMake>=3.10),然后需要在你的CMake项目中引入dtkcore的CMake模块如下
```cmake
find_package(Dtk6Core REQUIRED)
target_link_libraries(<target>
Dtk6::Core
)
```
```qmake
QT += dtkcore
```
```bash
pkg-config --cflags --libs dtk6core
# pkgconfig find Dtk6Core in qmake
# CONFIG += link_pkgconfig
# PKGCONFIG += dtk6core
# pkgconfig find Dtk6Core in cmake
# find_package(PkgConfig REQUIRED)
# pkg_check_modules(Dtk6Core REQUIRED IMPORTED_TARGET dtk6core)
# target_link_libraries(<target> PkgConfig::Dtk6Core )
```
以上示例仅为最小示例并不能单独作为CMake项目使用需要你自己添加其他的CMake模块如Qt的CMake模块以及你自己的CMake模块.
@note 注意dtkcore的QMake模块会自动引入Qt5的QMake模块所以不需要再次引入Qt5的QMake模块,但是在使用CMake的时候必须手动引入Qtcore的CMake模块
## 文档
阅读文档建议从模块页面开始模块页面提供了dtkcore的各个模块的简介以及各个模块的使用示例。
@subpage DLog
dtkcore的文档使用doxygen管理,由deepin_doc_doc_go_sig提供维护支持, 如果你也想加入sig,请访问[deepin_doc_doc_go_sig](https://matrix.to/#/#deepin_doc_doc_go:matrix.org)
## 许可
dtkcore使用LGPLv3许可证你可在此许可证下自由使用dtkcore <br>
dtkcore的文档使用[CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/)许可证你可在此许可证下自由使用dtkcore的文档,但是转发或者引用时必须注明出处。

113
docs/dci/ddcifile.zh_CN.dox Normal file
View File

@ -0,0 +1,113 @@
/*!
@~chinese
@file include/dci/ddcifile.h
@ingroup dci
@class Dtk::Core::DDciFile ddcifile.h
@brief ddcifile.h 是关于dci文件相关操作的一个类,实现了 DCI 文件的逻辑。其只是对数据的打包
dci文件的结构路径如下:
![DCI图标结构路径](@ref dciicon-tree.png )
@enum Dtk::Core::DDciFile::FileType
@var Dtk::Core::DDciFile::FileType Dtk::Core::DDciFile::UnknowFile
@brief 未知文件
@var Dtk::Core::DDciFile::FileType Dtk::Core::DDciFile::File
@brief 文件
@var Dtk::Core::DDciFile::FileType Dtk::Core::DDciFile::Directory
@brief 目录
@var Dtk::Core::DDciFile::FileType Dtk::Core::DDciFile::Symlink
@brief 软链接
@fn bool Dtk::Core::DDciFile::isValid()
@brief 判断读取的dci文件是否有效
@details 当指定的dci文件未成功加载时,此函数会返回false,一般会出现在文件格式错误(不是一个dci格式的文件),或者是dci文件数据被篡改而无法识别的情况
@note 本类中所有涉及文件操作的函数均会首先执行此方法,故如无必要,无需手动确保文件是否有效
@fn QString Dtk::Core::DDciFile::lastErrorString()
@brief 获取上一个报错信息,为人类可读字符串,可以通过此报错信息来获取错误内容,一般情况下是因为文件不存在或者文件名过长(>62个字符)导致。
@fn bool Dtk::Core::DDciFile::writeToFile(const QString &fileName)
@brief 写入文件,在做完对于dci文件的操作之后调用此接口,为保存的作用
@param[in] fileName 文件名
@fn bool Dtk::Core::DDciFile::writeToDevice(QIODevice *device)
@brief 写入到设备,设备指的是qt中的io设备,可以在qt文档中找到相关信息
@param[in] device IO设备
@sa [QIODevice](https://doc.qt.io/qt-6/qiodevice.html)
@fn QByteArray Dtk::Core::DDciFile::toData()
@brief 返回dci文件的原始数据,以QByteArray形式返回
@retval 如果返回为空字符串则说明读取失败
@sa DDciFile::writeFile
@fn static constexpr int Dtk::Core::DDciFile::metadataSizeV1()
@brief MAGIC_SIZE + VERSION_SIZE + FILE_COUNT_SIZE: 4+1+3 = 8
@fn QStringList Dtk::Core::DDciFile::list(const QString &dir, bool onlyFileName = false)
@brief 列出文件列表
@param[in] dir 文件夹地址
@param[in] onlyFileName 是否只显示文件名 默认为false
@fn int Dtk::Core::DDciFile::childrenCount(const QString &dir)
@brief 子文件计数
@fn bool Dtk::Core::DDciFile::exists(const QString &filePath)
@brief 判断文件是否存在
@param[in] filePath DCI图标结构路径
@fn FileType Dtk::Core::DDciFile::type(const QString &filePath)
@brief 判断文件类型
@sa DDciFile::FileType
@param[in] filePath DCI图标结构路径
@fn QByteArray Dtk::Core::DDciFile::dataRef(const QString &filePath)
@brief 获取dci内部文件的数据,以一种引用(软连接)的方式获取,不会产生数据的的复制
@param[in] filePath DCI图标结构路径
@retval 如果返回为空字符串,则说明此文件不存在或者无效
@fn QString Dtk::Core::DDciFile::name(const QString &filePath)
@brief 获取dci内文件的文件名
@param[in] filePath DCI图标结构路径
@retval 如果返回为空字符串,则说明此文件不存在或者无效
@fn QString Dtk::Core::DDciFile::symlinkTarget(const QString &filePath, bool originData = false)
@brief 获取软链目标
@param[in] filePath DCI图标结构路径
@param[in] originData
@retval 如果返回为空字符串,则说明此文件不存在或者无效
@note 链接的目标只能是“不存在的路径”、“文件”、“链接”,不可是目录
@fn bool Dtk::Core::DDciFile::mkdir(const QString &filePath)
@brief 创建目录(注意此目录指的是在dci文件内部的目录而不是指的是传统目录)
@param[in] filePath DCI图标结构路径
@return 操作是否成功
@fn bool Dtk::Core::DDciFile::writeFile(const QString &filePath, const QByteArray &data, bool override = false)
@brief 写入文件
@param[in] filePath DCI图标结构路径
@param[in] data 数据内容
@param[in] override 当文件已经存在时,是否覆盖此文件,默认状态下不执行覆盖,会在lasterror中记录"The target file is existed"错误信息。
如果传入为true,则会执行覆盖操作,** 此操作不可逆 **。
@return 操作是否成功
@sa QByteArray DDciFile::toData()
@fn bool Dtk::Core::DDciFile::remove(const QString &filePath)
@brief 移除文件
@param[in] filePath DCI图标结构路径
@return 操作是否成功
@fn bool Dtk::Core::DDciFile::rename(const QString &filePath, const QString &newFilePath, bool override = false)
@brief 重命名文件
@param[in] filePath DCI图标结构路径
@param[in] newFilePath 新文件的路径
@param[in] override 当文件已经存在时,是否覆盖此文件,默认状态下不执行覆盖,会在lasterror中记录"The target file is existed"错误信息。
如果传入为true,则会执行覆盖操作,** 此操作不可逆 **。
@return 操作是否成功
@fn bool Dtk::Core::DDciFile::link(const QString &source, const QString &to)
@brief 链接文件
@param[in] source 文件源
@param[in] to 链接目标
@return 操作是否成功
*/

92
docs/dci/index.zh_CN.md Normal file
View File

@ -0,0 +1,92 @@
@page dci dci--dci图标工具类
# DTk dcidci工具类
关于dtkcore提供的dci工具见[DCI](group__dci.html#files) <br>
下面内容是关于dci文件的简介还有一部分使用以及工具将会在以后的文档中提供
## 关于dci图标简介
`DCI` 图标是一种整合性图标格式,应用可以使用该图标完成多种状态的自动变化。例如, `ListView` 控件中高亮的 `Item` 图标自动反白,`Menu` 中图标跟随当前 `Item` 变化等等。
`dtkcore` 中提供了一个 `DDciFile` 的类,实现 `DCI` 文件的逻辑。其只是对数据的打包,不限于图片数据,可以是任何文本和二进制数据。 `dtkcore` 中还提供了用于在文管中解析文件的文件引擎,专门用于通过 `QFile``QDir` 处理 `dci` 文件。
dtkgui 中提供了一个 `DDciIcon` 类,实现了对 `DCI` 图标的逻辑。区别于 `DDciFile` ,它是 `DDciFile` 的上层封装,即使用 DDciFile 可以将文件进行打包归档的功能,封装了一种图标格式。 `DDciIcon` 中提供的接口,都是针对图标的,并无 `DDciFile` 的数据处理操作,多个 `DDciIcon` 进行数据拷贝和交换时,可以进行数据共享。 `DDciIcon` 可以通过调用 pixmap 函数返回需要显示的图片数据,也可以通过调用 paint 函数直接将内容绘制到目标内部。解析 Dci 图标的过程,这里讲解一下,详细过程可以查看代码理解:
首先需要创建一个 DDciFile 来解析 (*.dci) 文件,无论是本地文本还是二进制数据,都可以通过 `DDciFile` 来解析内部内容。
根据 `DDciIcon` 中规定好的路径格式,来解析出图标中拟定的各种信息,一般情况下的 `DDciIcon` 的路径格式是这样的:
![DCI图标结构路径](@ref dciicon-tree.png )
最上层时 `/` 作为根目录( `DCI` 文件都必须使用 `/` 作为根目录)。
第一层子目录( 16、32、512 )作为图标的大小。一般情况下是图标在 @11倍缩放比 时的大小(在目前的使用设计师使用的 dci 图标插件的)。例如上述图标,传入的大小在 0-16时选择 16传入大小在 16-32 时选择 32... 以此类推。
第二层目录( `normal.light` )作为该层图标的状态和主题,其中状态分为 `Normal` `Disabled` `Hovered``Pressed` 四种,主题分为 `light``dark` 两种。四种状态和两种主题可产生 8 种组合,也就是说,每种大小的图标最多有八种不同状态和主题的子图标进行切换。需要注意的是:状态和主题存在缺省模式: `normal``light` 。如果传入的状态和主题在所属大小的子图标下未找到,则选择缺省模式的状态和主题。也就是说,当图标的 `Normal``light` 状态未找到任何图标时,该图标是无效的。一般情况下,如果图标不会在不同状态和主题下发生过大的样式修改,只修改内部颜色填充时,可以不添加特殊状态的图标,通过修改调色版解决。(后面提及)
第三层目录1、2作为缩放比系数可以存放多个缩放比系数来适配系统的缩放比。例如上述示例缩放比系数在1和2之间时选择 2大于 2 时,选择 2 ,默认情况下选择 1。目前提供的图标中为了保证尽量减少图标文件的大小仅保存缩放比为 3 的文件。在软件层面进行缩放。
第四层1.png描述图标图片文件图层所携带的信息。这些信息中包含图层优先级、外边框数值、调色板格式、颜色调整数值、图层格式。可以通过下述文件表
```
├── 1.7p.3.png.alpha8
├── 2.3.webp
└── 3.7p.3_0_0_-10_0_0_0_0.png.alpha8
│ │ │ │ │ │ ┕━┳━┙┕━┳━┙
│ │ │ │ │ │ rgba format
│ │ │ │ │ │
│ │ │ │ │ └─ lightness (亮度)
│ │ │ │ └─ saturation (饱和度)
│ │ │ └─ hue (色调)
│ │ └─ palette 高亮色3
│ └─ padding (填充间隔)
└─ prior (图层)
<prior>.[padding].<p_h_s_l_r_g_b_a>.<format>
```
下面进行一一介绍:
* **图层优先级**(`prior`):优先级代表图层的绘制顺序,从 1-n 进行绘制,最底层的图层会被上层图层覆盖。
* **外边框数值**(`padding`):外边框在有阴影效果的图标中充分利用。 `padding` 代表图层外围不被控件大小覆盖的区域。
![layout](@ref layout.png)
类似控件的布局方式,这里可以之看 `padding` 部分, `padding` 定义四周所有数据,举个例子,如果子图标的大小是 32 (第一层目录的数值),一倍缩放比下,如果该图层的 `padding` 大小时 5那么该图层的真实图片大小是[32 + 5 × 2, 32 + 5 × 2] = [42, 42]。但最终, `padding` 区域的大小并不计算在整个图标大小内(仅针对 QMLdtkwidget 不支持)。为了区别其他数据, `padding` 的数值后面使用 `'p'` 进行结尾。例如上述示例:`'7p'` 。
* **调色板格式** 当存在调色板时就表示该图标的颜色是通过调色板的颜色进行动态变化的外部修改调色板颜色后预览效果会随之发生变化。因此该图标有两种特性1. 可以转换成 alpha8 格式; 2. 可以不需要其他状态通过调色板变化即可。当无调色板时该部分的数值为空。调色板格式分为5种无效-1、前景色0、背景色1、高亮前景色2、高亮色3
* **颜色调整数值** :颜色调整只针对有调色板的图层(调色板格式部分数据不为空)时。一旦存在,必须要将其所有的数据写入,例如上述示例。颜色调整数值使用 '_' 进行分割。
每个部分表示hu、saturation、lightness、red、green、blue、alpha。
* **图层格式** :图层格式可以使用:"png"、"jpg"、"webp"。如果图层存在调色板格式,就意味着可以优化其大小,转化为 alpha8 格式,使用".alpha8" 作为后缀,进行标识,在软件渲染时进行进行复原。
`DCI` 图标的细节介绍在 应用图标,上面主要介绍 `DCI` 图标的整个结构和在 `QML` 中的使用方式。其主要是设计实现了一种特殊格式的文件(.dci该种格式通过路径名称和文件数据打包到同一个文件内使不同状态、大小、主题的多个图标图片整合到同一个文件内在程序内部自动匹配当前状态选择合适的图标图片。因此总的来说 `DCI` 图标是对多个图标图片的打包归档。
本文将介绍 `DCI` 图标在 `dtkwidget``dtkdeclarative` 中的使用,对于一些 `DCI` 图标相关的高级知识(使用方无需过度关心),如 “DDciIconPalette”、“缩放比的适配”以及“图片的格式”等等。
**请注意:** 当使用 `DciIcon` 时,如果您认为控件在某种状态下需要进行图标变色或更换图标而未出现时,可能是由于**设计提供的图标未指定变色所需要的调色板对象(可以理解为图标出错)** 或 **设计认为该种场景下不需要变色(即固定样式图标)**,请及时与设计沟通。
### 1. 图标状态
大部分控件可以分为 `Normal``Hovered``Pressed``Disabled` 四种状态。这四种状态是每种控件的基础状态。因此将使用这几种状态作为图标的状态分类。
#### 答疑
1. 为什么没有 `Checked``Inactive` 类似这样的状态?
`Checked` 状态属于复合状态,并不属于基础状态。 `Checked` 状态下,可以有 `Hovered``Pressed``Normal` 等等状态,相同地, `Unchecked` 状态也会存在一样的情况。因此, `Checked` 状态并不适合作为 `DCI` 图标的状态。对于需要时,可通过控件的 `checked` 状态属性,切换下不同的图标即可。
`Inactive` 状态作为窗口的状态,在 `DTK` 应用都会通过降低透明度的方式实现,而不是作为图标状态。
2. 为什么需要这些状态?
存在这些状态的原因是,为了让应用和开发者更加无感知的使用图标,而无需关心不同状态下进行图标切换的操作。方便设计师一次提供多种状态的图标到一个图标文件中,进行压缩整合。防止出现图标资源较多,占用较大系统内存,同时能够帮助设计师在控件的不同状态下,不仅仅只局限于修改图标颜色这一种功能,也可以通过不同的图标代替,更适合多样化的样式设计。
3. 图标不显示可能是什么原因?
很可能是 webp 格式的支持问题, 查看一下系统中是否安装 `qt5-image-formats-plugins` ,这个包中有对 webp 格式图片格式的支持。
### 2. 图标大小和缩放比
应用所关心的图标大小是否正常,是否能够适配高缩放比模式等等。 `DCI` 图标中都做到了这些,默认情况下,设计师所提供的图标大小能够满足应用开发的需求,应用只需要主动调用接口指定图标大小即可,例如 `dtkwidget`,中 `DIconButton` 可以使用 `setIconSize` 指定; `QML` 中可以指定 `DciIcon` 控件的 `sourceSize` 或者 `Button` 控件的 `icon.size` 等等。而对于高缩放比的适配, `DTK` 已经全部完成无需应用关心。
@defgroup dci
@brief dtkdci图标工具类, 提供对于dci文件的操作方法
@details 详细内容可见 [DCI图标简介](md_docs_dci_index_zh_CN.html#autotoc_md0)

View File

@ -0,0 +1,68 @@
/*!
@~chinese
@ingroup dfilesystem
@file include/filesystem/dbasefilewatcher.h
@class Dtk::Core::DBaseFileWatcher
@brief DBaseFileWatcher 类提供了一系列接口可供监视文件和目录的变动。
@note 建议使用 DFileWatcher 类,该类是 DBaseFileWatcher 的子类提供了更多的功能。或者使用DFileWatcherManager类该类提供了对文件和目录的监视功能。
@warning 该类是一个虚类,不应该被直接使用,而应该使用 DFileWatcher 类或者 DFileWatcherManager 类。
@fn QUrl Dtk::Core::DBaseFileWatcher::fileUrl()
@brief 返回文件的统一资源定位符
@sa [QUrl](https://doc.qt.io/qt-5/qurl.html)
@fn bool Dtk::Core::DBaseFileWatcher::startWatcher()
@brief 开始监视文件变动
@return true 成功 false 失败
@sa DBaseFileWatcher::stopWatcher
@fn bool Dtk::Core::DBaseFileWatcher::stopWatcher()
@brief 停止监视文件变动
@return true 成功 false 失败
@sa DBaseFileWatcher::startWatcher()
@fn bool Dtk::Core::DBaseFileWatcher::restartWatcher()
@brief 重启监视文件变动
@return true 成功 false 失败
@sa DBaseFileWatcher::startWatcher()
@fn virtual void Dtk::Core::DBaseFileWatcher::setEnabledSubfileWatcher(const QUrl &subfileUrl, bool enabled = true)
@brief 设置是否对`subfileUrl`目录启用文件监视
@param[in] subfileUrl 设置所针对的 Url
@param[in] enabled 是否启用文件变动监视
@fn static bool Dtk::Core::DBaseFileWatcher::ghostSignal(const QUrl &targetUrl, SignalType1 signal, const QUrl &arg1)
@brief 发送一个信号表示目标目录`targetUrl`得到了一个`signal`信号,包含参数`arg1`<br>
使用方式如下:
@code
DBaseFileWatcher::ghostSignal(QUrl("bookmark:///"), &DBaseFileWatcher::fileDeleted, QUrl("bookmark:///bookmarkFile1"));
@endcode
@return 成功发送返回 true,否则返回 false
@fn static bool Dtk::Core::DBaseFileWatcher::ghostSignal(const QUrl &targetUrl, DBaseFileWatcher::SignalType2 signal, const QUrl &arg1, const QUrl &arg2)
@brief 发送一个信号表示目标目录`targetUrl`得到了一个`signal`信号,包含参数`arg1`和`arg2`<br>
@details 示例用法:
@code
DBaseFileWatcher::ghostSignal(QUrl("bookmark:///"), &DBaseFileWatcher::fileMoved, QUrl("bookmark:///bookmarkFile1"), QUrl("bookmark:///NewNameFile1"));
@endcode
@var Dtk::Core::DBaseFileWatcher::fileDeleted(const QUrl &url)
@brief 文件被删除的信号
@var Dtk::Core::DBaseFileWatcher::fileMoved(const QUrl &fromUrl, const QUrl &toUrl)
@brief 文件被移动的信号
@var Dtk::Core::DBaseFileWatcher::fileAttributeChanged(const QUrl &url)
@brief 文件属性被改变的信号
@var Dtk::Core::DBaseFileWatcher::subfileCreated(const QUrl &url)
@brief 子文件被创建的信号
@var Dtk::Core::DBaseFileWatcher::fileClosed(const QUrl &url)
@brief 文件被关闭的信号
@var Dtk::Core::DBaseFileWatcher::fileModified(const QUrl &url)
@brief 文件被修改的信号
*/

View File

@ -0,0 +1,192 @@
/*!
@~chinese
@ingroup dfilesystem
@file include/filesystem/dcapfile.h
@class Dtk::Core::DCapFile
@brief 对于文件操作的安全封装, 提供了带有安全管控的文件读取, 相关漏洞见[CWE_22](https://cwe.mitre.org/data/definitions/22.html)
@fn explicit Dtk::Core::DCapFile(QObject *parent = nullptr)
@brief 默认构造函数, 创建一个文件默认文件对象
@fn Dtk::Core::DCapFile::DCapFile(const QString &name, QObject *parent)
@brief 重载的构造函数, 接受传入一个文件名, 并创建一个文件对象
@note 调用此构造函数相当于调用默认构造函数+`DCapFile::setFileName()`
@fn void Dtk::Core::DCapFile::setFileName(const QString &name)
@brief 传入需要操作的文件名
@fn bool Dtk::Core::DCapFile::exists() const
@brief 文件是否存在
@note 此处的存在指当前由setFileName() 指定的文件或者是在构造时指定的文件是否可读可写
@note 需要在构造时或者手动指定了文件名才可以使用此函数, 否则请调用其重载的函数
@fn static bool Dtk::Core::DCapFile::exists(const QString &fileName)
@brief 文件是否存在
@param[in] fileName 文件名
@note 此处的存在指的是此函数的传入的文件名指向的文件是否可读可写
@fn QString Dtk::Core::DCapFile::readLink() const
@brief 读取软连接, 如果软连接指向的文件不允许读写, 则返回空字符串
@note 此方法在Qt版本>=5.13后**废弃**
@return 返回软连接指向的文件或者目录的绝对路径
@note 需要在构造时或者手动指定了文件名才可以使用此函数, 否则请调用其重载的函数
@sa [readLink](https://doc.qt.io/qt-5/qfile-obsolete.html#readLink-1)
@fn QString Dtk::Core::DCapFile::symLinkTarget() const
@brief 这是一个重载函数<br>
返回符号链接, 或Windows上的快捷方式指向的文件或目录的绝对路径, 如果该对象不是符号链接, 则返回一个空字符串。
@fn bool Dtk::Core::DCapFile::remove()
@brief 如果文件存在则删除文件
@note 此处的存在指当前由setFileName() 指定的文件或者是在构造时指定的文件是否可读可写
@note 需要在构造时或者手动指定了文件名才可以使用此函数, 否则请调用其重载的函数
@note 文件需要在删除前被关闭
@fn static bool Dtk::Core::DCapFile::remove(const QString &fileName)
@brief 如果文件存在则删除文件
@param[in] fileName 文件名
@note 此处的存在指的是此函数的传入的文件名指向的文件是否可读可写
@note 文件需要在删除前被关闭
@sa DCapFile::remove()
@fn bool Dtk::Core::DCapFile::moveToTrash()
@brief 如果文件存在则将文件移动至默认回收站(垃圾桶)
@note 此处的存在指当前由setFileName() 指定的文件或者是在构造时指定的文件是否可读可写
@note 需要在构造时或者手动指定了文件名才可以使用此函数, 否则请调用其重载的函数
@note 此方法仅在Qt版本>=5.15.0后可用
@fn bool Dtk::Core::DCapFile::moveToTrash(const QString &fileName, QString *pathInTrash)
@brief 如果传入文件名对应文件存在则将文件移动至指定回收站(垃圾桶)
@note 此处的存在指的是此函数的传入的文件名指向的文件是否可读可写
@note 此方法仅在Qt版本>=5.15.0后可用
@param[in] fileName 文件名
@param[in] pathInTrash 回收站路径
@fn bool Dtk::Core::DCapFile::rename(const QString &newName)
@brief 如果文件名存在则重命名文件
@param[in] newName 新文件名
@note 需要在构造时或者手动指定了文件名才可以使用此函数, 否则请调用其重载的函数
@fn static bool Dtk::Core::DCapFile::rename(const QString &oldName, const QString &newName)
@brief 如果文件名存在则重命名文件
@param[in] oldName 旧文件名
@param[in] newName 新文件名
@fn bool Dtk::Core::DCapFile::link(const QString &newName)
@brief 创建一个名为newName的链接
@details 该链接指向当前由`setFileName()`指定的文件或者是在构造时指定的文件。链接是什么取决于底层文件系统(无论是Windows上的快捷方式还是Unix上的符号链接)。如果成功, 则返回ture;否则返回false
@note 如果是windows系统的newName参数必须有`.lnk`合法后缀才可用
@param[in] newName 新文件名
@fn static bool Dtk::Core::DCapFile::link(const QString &oldname, const QString &newName)
@brief 该函数是重载`DCapFile::link()`区别是需要手动传入原始文件名
@sa DCapFile::link(const QString &newName)
@fn bool Dtk::Core::DCapFile::copy(const QString &newName)
@brief `setFileName()`指定的文件或者是在构造时指定的文件复制一份, 名为newName<br>
如果成功, 则返回ture;否则返回false
@note 确保文件在复制之前是关闭的
@note 如果复制的文件是一个符号链接(symlink), 它所指的文件被复制, 而不是链接本身。除了权限
会被复制外, 其他的文件元数据都不会被复制。
@note 如果一个名称为 newName 的文件已经存在, `copy()`将会返回true但是并不会覆盖它
@fn static bool Dtk::Core::DCapFile::copy(const QString &fileName, const QString &newName)
@brief 该函数是重载`DCapFile::copy(const QString &newName)`区别是需要手动传入原始文件名
@sa DCapFile::copy(const QString &newName)
@fn bool Dtk::Core::DCapFile::open(OpenMode flags)
@brief 使用OpenMode模式打开文件, 如果成功返回true;否则返回false<br>
@details 模式如下:<br>
NotOpen = 0x0000, <br>
ReadOnly = 0x0001, <br>
WriteOnly = 0x0002, <br>
ReadWrite = ReadOnly | WriteOnly, <br>
Append = 0x0004, <br>
Truncate = 0x0008, <br>
Text = 0x0010, <br>
Unbuffered = 0x0020, <br>
NewOnly = 0x0040, <br>
ExistingOnly = 0x0080<br>
@note 在只写或读写模式下, 如果相关文件不存在, 该函数将在打开文件之前尝试创建一个新文件
@fn bool Dtk::Core::DCapFile::resize(qint64 sz)
@brief 设置文件大小sz(以字节为单位)。如果调整大小成功, 则返回true;否则为false。如果sz大于当前文件, 则新字节将设置为 0;如果sz较小, 则文件将被简单地截断
@note 如果文件不存在, 此函数可能会无效
@fn static bool Dtk::Core::DCapFile::resize(const QString &filename, qint64 sz)
@brief 该函数是重载`DCapFile::resize(qint64 sz)`区别是手动指定文件名
@sa DCapFile::resize(qint64 sz)
*/
/*!
@class Dtk::Core::DCapFile
@brief 对于文件夹操作的封装
@fn Dtk::Core::DCapDir::DCapDir(const DCapDir &)
@brief 拷贝构造函数 构造一个DCapDir对象, 该对象是目录目录的DCapDir对象的副本
@fn Dtk::Core::DCapDir::DCapDir(const QString &path = QString())
@brief 构造指向给定目录路径的DCapDir。如果 path 为空, 则使用程序的工作目录`.`
@fn Dtk::Core::DCapDir::DCapDir(const QString &path,
const QString &nameFilter, SortFlags sort = SortFlags(Name | IgnoreCase),
Filters filter = AllEntries)
@brief 构造具有路径路径的DCapDir对象
@details 该 DCapDir 使用nameFilter按名称筛选其条目, 并使用筛选器 按属性筛选其条目。它还使用排序对名称进行排序。<br>
默认名称筛选器是一个空字符串, 它不排除任何内容;默认筛选器是“所有条目”, 这也意味着不排除任何内容。默认排序为“名称|忽略大小写, 即按名称排序, 不区分大小写。
如果path为空字符串, DCapDir 将使用 “.”(当前目录)<br>
如果nameFilter为空字符串, DCapDir 将使用名称筛选器“*”(所有文件)
@note 路径不需要存在
@fn void Dtk::Core::DCapDir::setPath(const QString &path)
@brief 将目录的路径设置为path。该路径被清除了多余的"."、"... "和多个分隔符。没有检查这个路径的
目录是否真的存在;<br>
路径可以是绝对路径也可以是相对路径, 绝对路径以目录分隔符"/"开始(在Windows下可以选择在前面加一个驱动器号, 例如: C:\)<br>
相对路径以目录名开始, 并指定一个相对于当前目录的路径。一个绝对路径的例子是字符串"/etc/apt", 一个相对路径例子是 "src/1/"<br>
@fn bool Dtk::Core::DCapDir::cd(const QString &dirName)
@brief 将DCapDir的目录更改为dirName。
如果新目录存在, 则返回true;否则返回false
请注意, 如果新目录不存在, 则不执行逻辑`cd()`操作
@fn QStringList Dtk::Core::DCapDir::entryList(Filters filters = NoFilter, SortFlags sort = NoSort) const
@brief 返回目录中所有文件和目录的名称列表
@details 这些名称根据以前使用`setNameFilters()` 和`setFilter()`
设置的名称和属性筛选器排序, 并根据使用`setSorting() 设置的标志进行排序。<br>
可以使用过滤器和排序参数覆盖属性过滤器和排序规范。
如果目录不可读、不存在或与规范不匹配, 则返回空列表。
@fn QString Dtk::Core::DCapDir::entryList(const QStringList &nameFilters, Filters filters = NoFilter,
SortFlags sort = NoSort)
@brief 重载函数, 返回目录中所有文件和目录的名称列表
@sa entryList(Filters filters = NoFilter, SortFlags sort = NoSort)
@fn bool Dtk::Core::DCapDir::mkdir(const QString &dirName) const
@brief 创建文件夹
@fn bool Dtk::Core::DCapDir::rmdir(const QString &dirName) const
@brief 移除文件夹
@fn bool Dtk::Core::DCapDir::mkpath(const QString &dirPath)
@brief 创建目录
@fn bool Dtk::Core::DCapDir::rmpath(const QString &dirPath)
@brief 移除目录
@fn bool Dtk::Core::DCapDir::exists() const
@brief 文件夹是否存在(如果找到同名文件, 此函数将返回 false)
@fn bool Dtk::Core::DCapDir::exists(const QString &name) const
@brief 指定文件夹是否存在(如果找到同名文件, 此函数将返回 false)
@fn bool Dtk::Core::DCapDir::remove(const QString &fileName)
@brief 移除文件夹
@fn bool Dtk::Core::DCapDir::rename(const QString &oldName, const QString &newName)
@brief 重命名文件夹
@param[in] oldName 旧文件夹名
@param[in] newName 新文件夹名
*/

View File

@ -0,0 +1,73 @@
/*!
@~chinese
@ingroup dfilesystem
@file include/filesystem/dfilesystemwatcher.h
@class DFileSystemWatcher
@brief 监听文件系统变化的类
@details
DFileSystemWatcher监视文件系统对文件的更改和目录通过观察指定的path列表。<br>
调用addPath()来监视特定的文件或目录。多个path可以使用addPaths()函数添加。现有path可以使用removePath()和removePaths()函数删除。<br>
DFileSystemWatcher检查添加到其中的每个path。具有以下特性的文件添加到DFileSystemWatcher可以使用函数Files()和使用函数directories()创建的目录。<br>
fileChanged()信号在文件被修改时发出重命名或从磁盘中删除。类似地directoryChanged()在目录或其内容被修改或移除。<br>
请注意DFileSystemWatcher只停止监视一次文件它们被重命名或从磁盘和目录中删除一次它们已从磁盘中移除。
@note 在运行不支持inotify的Linux内核的系统上包含被监视路径的文件系统不能被卸载。<br>
默认情况下Windows CE不支持目录监控这取决于安装的文件系统驱动程序。<br>
监视文件和目录的行为修改操作会消耗系统资源。这意味着有一个限制进程可以使用的文件和目录的数量同时监控。
@fn DFileSystemWatcher::DFileSystemWatcher(QObject *parent)
@brief 构造函数,构造一个新的文件系统监视器对象。
@fn DFileSystemWatcher::DFileSystemWatcher(const QStringList &paths, QObject *parent = Q_NULLPTR)
@brief 构造函数,构造一个新的文件系统监视器对象,监控指定路径列表。
@param paths 要监听的路径列表
@fn bool DFileSystemWatcher::addPath(const QString &file)
@brief 添加要监听的路径
@details 如果path存在则将path添加到文件系统监视器。如果path不存在或已经存在则不添加它由文件系统监视程序监视。<br>
如果path指定了一个目录则调用directoryChanged()信号将在path被修改或从磁盘中删除时发出。否则当path被修改、重命名或删除。就会触发fileChanged()信号<br>
如果监视成功则返回true。<br>
监视故障的原因通常与系统有关,但是可能包括资源不存在、访问失败或总监视数量限制,如果平台有一个。
@note 可能有一个系统依赖的数量限制可以同时监控的文件和目录。<br>
如果达到了这个限制path将不会被监控返回false。
@param[in] file 要监听的路径
@sa DFileSystemWatcher::addPaths()
@sa DFileSystemWatcher::removePath()
@fn QStringList DFileSystemWatcher::addPaths(const QStringList &files)
@brief 添加要监听的路径列表
@details 将path中的每个path添加到文件系统监视程序。path如果不存在或者已经存在则不添加由文件系统监视程序监视。<br>
如果path指定了一个目录则调用directoryChanged()信号将在path被修改或从磁盘中删除时触发。否则当path被修改、重命名或删除。就会触发fileChanged()信号<br>
返回值是一个无法被监视的路径列表。<br>
监视故障的原因通常与系统有关,但是可能包括资源不存在、访问失败或总监视数量限制,如果平台有一个。<br>
@note 可能有一个系统依赖的数量限制可以同时监控的文件和目录。<br>
如果达到了这个限制多余的path就不会达到它们将被添加到返回的QStringList中。
@param[in] files 要监听的路径列表
@sa DFileSystemWatcher::addPath()
@sa DFileSystemWatcher::removePaths()
@fn bool DFileSystemWatcher::removePath(const QString &file)
@brief 移除监听的路径
@details 从文件系统监视程序中删除指定的path。<br>
如果监视成功删除则返回true。<br>
监视删除失败的原因通常与系统有关但可能是因为path已经被删除了。
@sa DFileSystemWatcher::removePaths()
@sa DFileSystemWatcher::addPath()
@fn QStringList DFileSystemWatcher::removePaths(const QStringList &files)
@brief 移除监听的路径列表
@details 从文件系统监视程序中删除指定的path。<br>
返回值是一个无法被监视的路径列表。<br>
监视删除失败的原因通常与系统有关但可能是因为path已经被删除了。
@sa DFileSystemWatcher::removePath()
@sa DFileSystemWatcher::addPaths()
@fn QStringList DFileSystemWatcher::directories() const
@brief 获取监听的目录列表
@sa DFileSystemWatcher::files()
@fn QStringList DFileSystemWatcher::files() const
@brief 获取监听的文件列表
@sa DFileSystemWatcher::directories()
*/

View File

@ -0,0 +1,44 @@
/*!
@~chinese
@ingroup dfilesystem
@file include/filesystem/dfilewatcher.h
@class DFileWatcher
@brief DFileWatcher 类提供了对 DBaseFileWatcher 接口的实现,可供监视文件和目录的变动
@fn DFileWatcher::DFileWatcher(const QString &filepath, QObject *parent = 0)
@brief 构造函数
@param filepath 要监视的文件或目录的路径
@param parent 父对象
@fn void DFileWatcher::onFileDeleted(const QString &path, const QString &name)
@brief 当文件被删除时触发的信号
@param[in] path 文件所在的目录路径
@param[in] name 文件名
@fn void DFileWatcher::onFileAttributeChanged(const QString &path, const QString &name)
@brief 当文件属性发生变化时触发的信号
@param[in] path 文件所在的目录路径
@param[in] name 文件名
@fn void DFileWatcher::onFileMoved(const QString &fromPath, const QString &fromName, const QString &toPath, const QString &toName)
@brief 当文件被移动时触发的信号
@param[in] fromPath 文件原来所在的目录路径
@param[in] fromName 文件原来的文件名
@param[in] toPath 文件现在所在的目录路径
@param[in] toName 文件现在的文件名
@fn void DFileWatcher::onFileModified(const QString &path, const QString &name)
@brief 当文件被修改时触发的信号
@param[in] path 文件所在的目录路径
@param[in] name 文件名
@fn void DFileWatcher::onFileCreated(const QString &path, const QString &name)
@brief 当文件被创建时触发的信号
@param[in] path 文件所在的目录路径
@param[in] name 文件名
@fn void DFileWatcher::onFileClosed(const QString &path, const QString &name)
@brief 当文件被关闭时触发的信号
@param[in] path 文件所在的目录路径
*/

View File

@ -0,0 +1,92 @@
/*!
@~chinese
@ingroup dfilesystem
@file include/filesystem/dfilewatchermanager.h
@class DFileWatcherManager
@brief DFileWatcherManager 类可以帮助管理一系列 DFileWatcher 文件监视器,并在文件变动时发送信号通知.
@details
示例代码:
```cpp
#include "dfilewatchermanager"
#include <QCoreApplication>
#include <QTemporaryFile>
#include <QDebug>
#include <QTimer>
DCORE_USE_NAMESPACE
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
DFileWatcherManager manager;
QTemporaryFile tmpfile1; // 创建临时文件1
tmpfile1.open();
QFile file1( tmpfile1.fileName());
QTemporaryFile tmpfile2; // 创建临时文件2
tmpfile2.open();
QFile file2( tmpfile2.fileName());
manager.add(tmpfile1.fileName());// 监控临时文件1
manager.add(tmpfile2.fileName());// 监控临时文件2
QObject::connect(&manager, &Dtk::Core::DFileWatcherManager::fileModified, &app, [=](const QString value) {
qDebug() << "文件发生变动:" << value;
}); // 文件发生变动时打印文件路径
QObject::connect(&manager, &Dtk::Core::DFileWatcherManager::fileDeleted, &app, [=](const QString value) {
qDebug() << "文件被删除:" << value;
});
file1.open(QIODevice::WriteOnly|QIODevice::Text);// 修改临时文件1
file1.write("test");
file1.close();
file2.open(QIODevice::WriteOnly|QIODevice::Text);// 修改临时文件2
file2.write("test");
file2.close();
qDebug() << manager.watchedFiles();// 打印所有被监控的文件路径
qDebug() << "---------------------------";
app.processEvents();// 处理事件
manager.removeAll();// 移除所有的监控
qDebug() << manager.watchedFiles();// 打印所有被监控的文件路径
return app.exec();
}
```
上面代码演示了如何使用 DFileWatcherManager 类来监控文件变动和清除文件变动的监控.
具体可以参照源码中的example文件夹中的文件变动监控例子.
@fn DFileWatcher* DFileWatcherManager::add(const QString &filePath)
@brief 为路径`filePath`创建 DFileWatcher 并将其添加到 DFileWatcherManager 中.
@return 被创建并添加到 DFileWatcherManager 的 DFileWatcher
@fn void DFileWatcherManager::remove(const QString &filePath)
@brief 从 DFileWatcherManager 中移除路径`filePath`对应的 DFileWatcher.
@fn void DFileWatcherManager::removeAll()
@brief 从 DFileWatcherManager 中移除所有的 DFileWatcher.
@fn void DFileWatcherManager::watchedFiles()
@brief 获取 DFileWatcherManager 中所有的 DFileWatcher.
@var void DFileWatcherManager::fileDeleted(const QString &filePath)
@brief 当路径`filePath`对应的文件被删除时发送此信号.
@var void DFileWatcherManager::fileAttributeChanged(const QString &filePath)
@brief 当路径`filePath`对应的文件属性发生变化时发送此信号.
@var void DFileWatcherManager::fileMoved(const QString &fromFilePath, const QString &toFilePath)
@brief 当路径`fromFilePath`对应的文件被移动到路径`toFilePath`时发送此信号.
@var void DFileWatcherManager::fileClosed(const QString &filePath)
@brief 当路径`filePath`对应的文件被关闭时发送此信号.
@var void DFileWatcherManager::fileModified(const QString &filePath)
@brief 当路径`filePath`对应的文件被修改时发送此信号.
@var void DFileWatcherManager::subfileCreated(const QString &filePath)
@brief 当路径`filePath`对应的文件夹中有新的子文件被创建时发送此信号.
*/

View File

@ -0,0 +1,47 @@
/*!
@~chinese
@ingroup dfilesystem
@file include/filesystem/dstandardpaths.h
@class DStandardPaths
@brief DStandardPaths 类描述了一些标准的文件路径包括XDG文件路径locate等
@fn static QString DStandardPaths::writableLocation(QStandardPaths::StandardLocation type)
@brief DStandardPaths提供兼容Snap/Dtk标准的路径模式。DStandardPaths实现了Qt的QStandardPaths主要接口。此处返回可写路径
@fn static QStringList DStandardPaths::standardLocations (QStandardPaths::StandardLocation type)
@brief DStandardPaths提供兼容Snap/Dtk标准的路径模式。DStandardPaths实现了Qt的QStandardPaths主要接口。此处返回所有Standardpath
@fn static QString DStandardPaths::locate(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options = QStandardPaths::LocateFile)
@brief 在 type 的标准位置查找名为 fileName 的文件或目录。选项标志允许您指定是否查找文件或目录。默认情况下,此标志设置为 LocateFile。返回找到的第一个文件或目录的绝对路径否则返回空字符串。
@fn static QStringList DStandardPaths::locateAll(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options = QStandardPaths::LocateFile)
@brief 在类型的标准位置中按名称 fileName 查找所有文件或目录。选项标志允许您指定是否查找文件或目录。默认情况下,此标志设置为 LocateFile。返回找到的所有文件的列表。
@fn static QString DStandardPaths::findExecutable(const QString &executableName, const QStringList &paths = QStringList())
@brief 同QStandardPaths::findExecutable, 查找可执行文件
@fn static void DStandardPaths::setMode(DStandardPaths::Mode mode)
@brief 同QStandardPaths::setTestModeEnabled, 设置是否是测试模式
@fn static QString DStandardPaths::homePath()
@brief 返回家目录
@fn static QString DStandardPaths::homePath(const uint uid)
@brief 用uid返回家目录
@fn static QString DStandardPaths::path(DStandardPaths::XDG type)
@brief 返回对应的xdg目录
@fn static QString DStandardPaths::path(DStandardPaths::DSG type)
@brief 返回对应Dsg目录
@fn static QStringList DStandardPaths::paths(DStandardPaths::DSG type)
@brief 返回所有DSG下所有目录
@fn static QString DStandardPaths::filePath(DStandardPaths::XDG type, QString fileName)
@brief 用xdg和文件名称拼接返回文件绝对路径
@fn static QString DStandardPaths::filePath(DStandardPaths::DSG type, QString fileName)
@brief 用dsg和文件名称拼接返回文件绝对路径
*/

View File

@ -0,0 +1,21 @@
/*!
@~chinese
@ingroup dfilesystem
@file include/filesystem/dtrashmanager.h
@class DTrashManager
@brief dtk垃圾管理器提供管理文件回收站的功能。
@details 非常简单的一个类
@fn ststic DTrashManager *DTrashManager::instance()
@brief 获取DTrashManager的实例
@fn bool DTrashManager::trashIsEmpty() const
@brief 判断回收站是否为空
@fn bool DTrashManager::cleanTrash()
@brief 清空回收站
@fn bool DTrashManager::moveToTrash(const QString &filePath, bool followSymlink = false)
@brief 将文件移动到回收站
*/

View File

@ -0,0 +1,8 @@
@page dfilesystem dfilesystem--dtk文件系统操作的封装
# Dlogdtk日志组件
TODO添加filesystem组件使用说明
@defgroup dfilesystem
@brief dtk文件系统操作的封装

View File

@ -0,0 +1,393 @@
/*!
@~chinese
@file include/global/dconfig.h
@ingroup dglobal
@class Dtk::Core::DConfigBackend dconfig.h
@brief 配置后端的抽象接口。
@details 所有DConfig使用的配置后端都继承此类,用户可以继承此类实现自己的配置后端。
@sa FileBackend
@sa DBusBackend
@sa QSettingBackend
@fn Dtk::Core::DConfigBackend::~DConfigBackend()
@brief DConfigBackend析构函数
@sa FileBackend::~FileBackend()
@sa DBusBackend::~DBusBackend()
@sa QSettingBackend::~QSettingBackend()
@fn bool Dtk::Core::DConfigBackend::isValid() const = 0
@brief 判断此后端是否可用
@sa DConfig::isValid()
@sa FileBackend::isValid()
@sa DBusBackend::isValid()
@sa QSettingBackend::isValid()
@fn bool Dtk::Core::DConfigBackend::load(const QString &) = 0
@brief 初始化后端
@details appId 管理的配置信息key值,默认为应用程序名称。
@sa FileBackend::load()
@sa DBusBackend::load()
@sa QSettingBackend::load()
@fn QStringList Dtk::Core::DConfigBackend::keyList() = 0
@brief 获得所有可用的配置项名称
@sa DConfig::keyList()
@sa FileBackend::keyList()
@sa DBusBackend::keyList()
@sa QSettingBackend::keyList()
@fn QVariant Dtk::Core::DConfigBackend::value(const QString &key, const QVariant &fallback = QVariant()) const = 0
@brief 根据配置项名称获得对应值
@param[in] key 配置项名称
@param[in] fallback 没有获取到配置项值后提供的默认值
@sa DConfig::value()
@sa FileBackend::value()
@sa DBusBackend::value()
@sa QSettingBackend::value()
@fn void Dtk::Core::DConfigBackend::setValue(const QString &key, const QVariant &value) = 0
@brief 根据配置项名称设置其值
@param[in] key 配置项名称
@param[in] value 需要更新的值
@sa DConfig::setValue()
@sa FileBackend::setValue()
@sa DBusBackend::setValue()
@sa QSettingBackend::setValue()
@fn void Dtk::Core::DConfigBackend::reset(const QString &key)
@brief 设置其配置项对应的默认值,此值为经过override机制覆盖后的值,不一定为此配置文件中meta中定义的值。
@param[in] key 配置项名称
@sa DConfig::reset()
@sa FileBackend::reset()
@sa DBusBackend::reset()
@sa QSettingBackend::reset()
@fn QString Dtk::Core::DConfigBackend::name() const = 0
@brief 后端配置的唯一标识
@sa FileBackend::name()
@sa DBusBackend::name()
@sa QSettingBackend::name()
@fn bool Dtk::Core::DConfigBackend::isDefaultValue(const QString &key)
@brief 检测指定配置项名称对应的值是否为默认值。
@param[in] key 配置项名称
@sa DConfig::isDefaultValue()
@sa FileBackend::isDefaultValue()
@sa DBusBackend::isDefaultValue()
@sa QSettingBackend::isDefaultValue()
@class Dtk::Core::QSettingBackend dconfig.h
@brief QSetting后端,继承自DConfigBackend抽象接口,并实现了虚函数。
@sa DConfigBackend
@fn QSettingBackend Dtk::Core::QSettingBackend::QSettingBackend(DConfigPrivate* o)
@brief QSettingBackend构造函数
@class Dtk::Core::DConfigPrivate dconfig.h
@brief DConfig的私有实现
@fn DConfigPrivate Dtk::Core::DConfigPrivate::DConfigPrivate()
@brief DConfigPrivate构造函数
@fn bool Dtk::Core::DConfigPrivate::invalid()
@brief 判断此后端是否可用
@fn DConfigBackend* Dtk::Core::DConfigPrivate::getOrCreateBackend()
@brief 创建一个配置后端
@details 默认使用的配置后端会优先根据环境变量来选择配置中心的D-Bus接口还是文件配置后端接口。若没有配置此环境变量,则根据是否有配置中心提供D-Bus服务来选择配置中心服务还是文件配置后端接口。
@fn DConfigBackend* Dtk::Core::DConfigPrivate::createBackendByEnv()
@brief 创建一个配置后端
@details 尝试根据环境变量来选择配置中心的D-Bus接口还是文件配置后端接口。
@var QString Dtk::Core::DConfigPrivate::appId
@brief 配置文件所属的应用Id,为空时默认为本应用Id。
@var QString Dtk::Core::DConfigPrivate::name
@brief 配置文件名
@var QString Dtk::Core::DConfigPrivate::subpath
@brief 配置文件对应的子目录
@var QScopedPointer<DConfigBackend> Dtk::Core::DConfigPrivate::backend
@brief 配置策略后端
@class Dtk::Core::DConfig dconfig.h
@brief 配置策略提供的接口类
@details
## 概述
此接口规范定义了开发库所提供的关于配置文件读写的相关接口,如果应用程序所使用的开发库实现了此规范,则程序应当优先使用开发库提供的接口。
项目目录结构如下:
```bash
├── CMakeLists.txt
├── config
│ └── example.json
└── main.cpp
```
## CMakeLists.txt
```cmake
cmake_minimum_required(VERSION 3.1.0) # 指定cmake最低版本
project(dconfig-example VERSION 1.0.0 LANGUAGES CXX) # 指定项目名称, 版本, 语言 cxx就是c++
set(CMAKE_CXX_STANDARD 11) # 指定c++标准
set(CMAKE_CXX_STANDARD_REQUIRED ON) # 指定c++标准要求,至少为11以上
set(CMAKE_AUTOMOC ON) # 支持qt moc
set(CMAKE_AUTORCC ON) # support qt resource file # 支持qt资源文件
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # 支持 clangd
if (CMAKE_VERSION VERSION_LESS "3.7.0") # 如果cmake版本小于3.7.0
set(CMAKE_INCLUDE_CURRENT_DIR ON) # 设置包含当前目录
endif()
find_package(Qt5 REQUIRED COMPONENTS Core) # 寻找Qt5组件Core
find_package(Dtk REQUIRED COMPONENTS Core) # 寻找Dtk组件Core
add_executable(${PROJECT_NAME} # 生成可执行文件
main.cpp
)
target_link_libraries(${PROJECT_NAME} PRIVATE # 添加需要链接的共享库
Qt5::Core
dtkcore
)
# dtk_add_config_meta_files函数部署一些"meta"的配置。
# 函数定义在dtkcore的cmake目录下
# APPID 应用的ID
# FILES 需要部署的文件。
dtk_add_config_meta_files(
APPID ${PROJECT_NAME}
FILES ./config/example.json
)
```
## example.json
```json
{
"magic": "dsg.config.meta",
"version": "1.0",
"contents": {
"canExit": {
"value": true,
"serial": 0,
"flags": ["global"],
"name": "I am name",
"name[zh_CN]": "我是名字",
"description": "I am description",
"permissions": "readwrite",
"visibility": "private"
},
"key1": {
"value": "125",
"serial": 0,
"flags": ["nooverride"],
"name": "I am name",
"name[zh_CN]": "我是名字",
"description": "I am description",
"permissions": "readwrite",
"visibility": "public"
},
"number": {
"value": 1,
"serial": 0,
"flags": ["global"],
"name": "array value type",
"permissions": "readwrite",
"visibility": "public"
},
"array": {
"value": ["value1", "value2"],
"serial": 0,
"flags": ["global"],
"name": "array",
"permissions": "readwrite",
"visibility": "public"
},
"map": {
"value": {"key1": "value1", "key2": "value2"},
"serial": 0,
"flags": ["global"],
"name": "map",
"permissions": "readwrite",
"visibility": "public"
}
}
}
```
## main.cpp
```cpp
#include <DConfig>
#include <QDebug>
#include <QCoreApplication>
DCORE_USE_NAMESPACE
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
// 构造DConfig元数据文件名example与元数据安装目录的/usr/share/dsg/configs/APPID名(可执行文件名)对应目录/example.json
DConfig config("example");
// 判断是否有效
if (!config.isValid()) {
qWarning() << QString("DConfig无效, name:[%1].").
arg(config.name());
return 0;
}
// 获取所有配置项的key
qDebug() << "所有的所有配置项的key:" << config.keyList();
// 获取指定配置项的值配置项可以是字符串数组map容器布尔值整型详见example.json
qDebug() << "canExit对应的值:" << config.value("canExit").toBool();
QVariantMap map;
for (int i = 0; i < 1; i++) {
QVariantMap nestItem;
for (int j = 0; j < 1; j++) {
nestItem[QString::number(j)] = QString::number(j);
}
map[QString::number(i)] = nestItem;
}
QScopedPointer<DConfig> heapConfig;
heapConfig.reset(new DConfig("example"));
if (!heapConfig->isValid()) {
qWarning() << QString("DConfig无效, name:[%1].").
arg(heapConfig->name());
return 0;
}
// 监听值改变的信号
const bool &oldValue = heapConfig->value("canExit").toBool();
QObject::connect(heapConfig.get(), &DConfig::valueChanged, [oldValue,&heapConfig](const QString &key){
qDebug() << "canExit原来的值:" << oldValue << ", canExit新的值:" << heapConfig->value(key).toBool();
});
// 重置canExit的值
heapConfig->setValue("canExit", !oldValue);
return a.exec();
}
```
## 从源码构建
```bash
mkdir build && cd build
# 修改路径前缀为/usr,GNU标准的默认值为/usr/local
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
```
结果如下图
![example](/docs/src/dconfig_example1.png)
@fn DConfig Dtk::Core::DConfig(const QString &name, const QString &subpath, QObject *parent)
@brief 构造配置策略提供的对象
@param[in] name 配置文件名
@param[in] subpath 配置文件对应的子目录
@param[in] parent 父对象
@fn DConfig Dtk::Core::DConfig(DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent)
@brief 使用自定义的配置策略后端构造对象
@param[in] backend 调用者继承于DConfigBackend的配置策略后端
@param[in] name 配置文件名
@param[in] subpath 配置文件对应的子目录
@param[in] parent 父对象
@fn static DConfig* Dtk::Core::DConfig::create(const QString &appId, const QString &name, const QString &subpath, QObject *parent)
@brief 构造配置策略提供的对象,指定配置所属的应用Id管理某一特定应用的配置。
@param[in] appId 配置文件所属的应用Id,为空时默认为本应用Id
@param[in] name 配置文件名
@param[in] subpath 配置文件对应的子目录
@param[in] parent 父对象
@return 构造的配置策略对象,由调用者释放
@fn static DConfig* Dtk::Core::DConfig::create(DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent)
@brief 构造配置策略提供的对象,指定配置所属的应用Id。
@param[in] backend 调用者继承于DConfigBackend的配置策略后端
@param[in] appId 配置文件所属的应用Id,为空时默认为本应用Id
@param[in] name 配置文件名
@param[in] subpath 配置文件对应的子目录
@param[in] parent 父对象
@return 构造的配置策略对象,由调用者释放
@fn static DConfig* Dtk::Core::DConfig::createGeneric(const QString &name, const QString &subpath, QObject *parent)
@brief 构造配置策略提供的对象,用来管理与应用无关的配置。
@param[in] name 配置文件名
@param[in] subpath 配置文件对应的子目录
@param[in] parent 父对象
@return 构造的配置策略对象,由调用者释放
@note 如果我们管理针对某一特定应用的配置,应该使用 Dtk::Core::DConfig::create(),或 Dtk::Core::DConfig()来指定所属应用的appId。
@fn static DConfig* Dtk::Core::DConfig::createGeneric(DConfigBackend *backend, const QString &name, const QString &subpath, QObject *parent)
@sa Dtk::Core::DConfig::createGeneric()
@fn DConfig Dtk::Core::DConfig(DConfigBackend *backend, const QString &appId, const QString &name, const QString &subpath, QObject *parent)
@brief 使用自定义的配置策略后端构造对象
@param[in] backend 调用者继承于DConfigBackend的配置策略后端
@param[in] appId 配置文件所属的应用Id,为空时默认为本应用Id
@param[in] name 配置文件名
@param[in] subpath 配置文件对应的子目录
@param[in] parent 父对象
@note 调用者只构造backend,由DConfig释放。
@fn static void DConfig::setAppId(const QString &appId)
@brief 显示指定应用Id,不采用DSGApplication::id()作为应用Id
@param[in] appId 配置文件所属的应用Id
@note 需要在QCoreApplication构造前设置。
@fn static void DConfig::globalThread()
@brief 一个服务于 DConfig 的公用线程,一般用于 dconfig2cpp 生成的代码,此线程在构造时会自动调用 QThread::start 以满足 dconfig2cpp 的需求。
@return 此线程默认为 running 状态
@note 请不要析构它,它会在应用程序退出时释放
@fn QString Dtk::Core::DConfig::backendName()
@brief 配置策略后端名称
@return 配置策略后端名称
@note 调用者只能用DConfig访问DConfigBackend对象,所以不返回DConfigBackend对象。
@fn QStringList Dtk::Core::DConfig::keyList()
@brief 获得所有可用的配置项名称
@return 配置项名称集合
@fn bool Dtk::Core::DConfig::isValid()
@brief 判断此后端是否可用
@fn bool Dtk::Core::DConfig::isDefaultValue(const QString &key)
@brief 检测指定配置项名称对应的值是否为默认值。
@param[in] key 配置项名称
@fn QVariant Dtk::Core::DConfig::value(const QString &key, const QVariant &fallback)
@brief 根据配置项名称获得对应值
@param[in] key 配置项名称
@param[in] fallback 没有获取到配置项值后提供的默认值
@fn void Dtk::Core::DConfig::setValue(const QString &key, const QVariant &value);
@brief 根据配置项名称设置其值
@param[in] key 配置项名称
@param[in] value 需要更新的值
@fn void Dtk::Core::DConfig::reset(const QString &key)
@brief 设置其配置项对应的默认值,此值为经过override机制覆盖后的值,不一定为此配置文件中meta中定义的值
@param[in] key 配置项名称
@fn QString Dtk::Core::DConfig::name()
@brief 返回配置文件名称
@fn QString Dtk::Core::DConfig::subpath()
@brief 返回配置文件对应的子目录
*/

View File

@ -0,0 +1,448 @@
/*!
@~chinese
@file include/global/dconfigfile.h
@ingroup dglobal
@class Dtk::Core::DConfigFile dconfigfile.h
@brief 规范配置文件读写的相关接口的配置文件实现
@details
## 概述
规范配置文件读写的相关接口的配置文件实现
项目目录结构如下:
```bash
├── CMakeLists.txt
├── config
│ └── example.json
└── main.cpp
```
## CMakeLists.txt
```cmake
cmake_minimum_required(VERSION 3.1.0) # 指定cmake最低版本
project(dconfigfile-example VERSION 1.0.0 LANGUAGES CXX) # 指定项目名称, 版本, 语言 cxx就是c++
set(CMAKE_CXX_STANDARD 11) # 指定c++标准
set(CMAKE_CXX_STANDARD_REQUIRED ON) # 指定c++标准要求,至少为11以上
set(CMAKE_AUTOMOC ON) # 支持qt moc
set(CMAKE_AUTORCC ON) # 支持qt资源文件
set(CMAKE_AUTOUIC ON) # 支持qt ui文件(非必须)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # 支持 clangd
if (CMAKE_VERSION VERSION_LESS "3.7.0") # 如果cmake版本小于3.7.0
set(CMAKE_INCLUDE_CURRENT_DIR ON) # 设置包含当前目录
endif()
find_package(Qt5 REQUIRED COMPONENTS Core) # 寻找Qt5组件Core
find_package(Dtk REQUIRED COMPONENTS Core) # 寻找Dtk组件Core
add_executable(${PROJECT_NAME} # 生成可执行文件
main.cpp
)
target_link_libraries(${PROJECT_NAME} PRIVATE # 添加需要链接的共享库
Qt5::Core
dtkcore
)
# dtk_add_config_meta_files函数部署一些"meta"的配置。
# 函数定义在dtkcore的cmake目录下
# APPID 应用的ID
# FILES 需要部署的文件。
dtk_add_config_meta_files(
APPID ${PROJECT_NAME}
FILES ./config/example.json
)
```
## example.json
```json
{
"magic": "dsg.config.meta",
"version": "1.0",
"contents": {
"canExit": {
"value": true,
"serial": 0,
"flags": ["global"],
"name": "I am name",
"name[zh_CN]": "我是名字",
"description": "I am description",
"permissions": "readwrite",
"visibility": "private"
},
"key1": {
"value": "125",
"serial": 0,
"flags": ["nooverride"],
"name": "I am name",
"name[zh_CN]": "我是名字",
"description": "I am description",
"permissions": "readwrite",
"visibility": "public"
},
"number": {
"value": 1,
"serial": 0,
"flags": ["global"],
"name": "array value type",
"permissions": "readwrite",
"visibility": "public"
},
"array": {
"value": ["value1", "value2"],
"serial": 0,
"flags": ["global"],
"name": "array",
"permissions": "readwrite",
"visibility": "public"
},
"map": {
"value": {"key1": "value1", "key2": "value2"},
"serial": 0,
"flags": ["nooverride"],
"name": "map",
"permissions": "readwrite",
"visibility": "public"
},
"publicConfig": {
"value": true,
"serial": 0,
"flags": ["user-public"],
"name": "public configure",
"name[zh_CN]": "我是公开的配置",
"description": "I am public configure",
"permissions": "readwrite",
"visibility": "private"
}
}
}
```
## main.cpp
```cpp
#include <DConfigFile>
#include <QDebug>
#include <QCoreApplication>
#include <unistd.h>
DCORE_USE_NAMESPACE
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
// 构造DConfigFile元数据文件名example与元数据安装目录的/usr/share/dsg/configs/APPID名(可执行文件名)对应目录/example.json
DConfigFile configFile("dconfigfile-example","example");
// 解析配置文件
configFile.load();
// 创建用户缓存
QScopedPointer<DConfigCache> userCache(configFile.createUserCache(getuid()));
// 解析配置文件
userCache->load();
// 判断是否有效
if (!configFile.isValid()) {
qWarning() << QString("DConfig无效.");
return 0;
}
// meta 返回原型对象, keyList获取所有配置项的key
qDebug() << "所有的所有配置项的key:" << configFile.meta()->keyList();
// 获取指定配置项的值配置项可以是字符串数组map容器布尔值整型详见example.json
qDebug() << "canExit对应的值:" << configFile.value("canExit").toBool();
// 配置项的可见性,其余配置项标记、配置项的权限可查看文档
qDebug() << "配置项的可见性" << configFile.meta()->visibility("canExit");
QVariantMap map;
map.insert("k1","v1");
map.insert("k2","v2");
// 设置map的值
configFile.setValue("map", map, "dconfigfile-example", userCache.get());
configFile.save();
// root用户运行save的数据会保存到/root/.config/dsg/configs-fake-global/dconfigfile-example/example.json
// map数据对应的flags标记为NoOverride配置项允许被覆盖如果flags为global泽忽略用户身份详见文档。
userCache->save();
return a.exec();
}
```
## 从源码构建
```bash
mkdir build && cd build
# 修改路径前缀为/usr,GNU标准的默认值为/usr/local
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
sudo make install
sudo ./dconfigfile-example
```
结果如下图
![一些简单的输出](/docs/src/dconfigfile_example1.png)
![用户保存的数据](/docs/src/dconfigfile_example2.png)
@enum Dtk::Core::DConfigFile::Flag
@brief 配置项名称
@var Dtk::Core::DConfigFile::Flag Dtk::Core::DConfigFile::NoOverride
@brief 存在此标记时,将表明则此配置项不可被覆盖(详见下述 override 机制)。反之,不存在此标记时表明此配置项允许被覆盖,对于此类配置项,如若其有界面设置入口,则当此项不可写时,应当隐藏或禁用界面的设置入口.
@var Dtk::Core::DConfigFile::Flag Dtk::Core::DConfigFile::Global
@brief 当读写此类配置时,将忽略用户身份,无论程序使用哪个用户身份执行,读操作都将获取到同样的数据,写操作将对所有用户都生效。但是,如果对应的配置存储目录不存在或无权限写入,则忽略此标志
@var Dtk::Core::DConfigFile::Flag Dtk::Core::DConfigFile::UserPublic
@brief 该类配置项允许被其他用户访问
@enum Dtk::Core::DConfigFile::Permissions
@brief 配置项的权限
@var Dtk::Core::DConfigFile::Permissions Dtk::Core::DConfigFile::ReadOnly
@brief 将配置项覆盖为只读
@var Dtk::Core::DConfigFile::Permissions Dtk::Core::DConfigFile::ReadWrite
@brief 将配置项覆盖为可读可写
@enum Dtk::Core::DConfigFile::Visibility
@brief 配置项的可见性
@var Dtk::Core::DConfigFile::Visibility Dtk::Core::DConfigFile::Private
@brief 仅限程序内部使用,对外不可见。此类配置项完全由程序自己读写,可随意增删改写其含义,无需做兼容性考虑
@var Dtk::Core::DConfigFile::Visibility Dtk::Core::DConfigFile::Public
@brief 外部程序可使用。 此类配置项一旦发布,在兼容性版本的升级中,要保障此配置项向下兼容,简而言之,只允许在程序/库的大版本升级时才允许删除或修改此类配置项,当配置项的 permissions、visibility、flags 任意一个属性被修改则认为此配置项被修改,除此之外修改 value、name、description 属性时则不需要考虑兼容性。
@struct Dtk::Core::DConfigFile::Version
@brief 版本信息
@details
此文件的内容格式的版本。版本号使用两位数字描述,
首位数字不同的描述文件相互之间不兼容,第二位数字不同的描述文件需满足向下兼容。
读取此描述文件的程序要根据版本进行内容分析,当遇到不兼容的版本时,需要立即终止解析,忽略此文件,
并在程序日志中写入警告信息,如 “1.0” 和 “2.0” 版本之间不兼容,
如果解析程序最高只支持 1.0 版本,则遇到 2.0 版本的描述文件时应该终止解析,
但是如果遇到 1.1 版本,则可以继续执行。
写入此描述文件时,遇到不兼容的版本时,需要先清空当前内容再写入,每次写入皆需更新此字段。
@fn static constexpr DConfigFile::Version Dtk::Core::DConfigFile::supportedVersion()
@brief 支持的版本
@return
@fn Dtk::Core::DConfigFile::DConfigFile(const QString &appId, const QString &name, const QString &subpath = QString())
@brief DConfigFile构造函数,构造配置文件管理对象。
@param[in] appId 应用程序唯一标识
@param[in] name 配置文件名
@param[in] subpath 子目录
@fn Dtk::Core::DConfigFile::DConfigFile(const DConfigFile &other);
@brief DConfigFile构造函数,构造配置文件管理对象。
@param[in] appId 应用程序唯一标识
@param[in] name 配置文件名
@param[in] subpath 子目录
@fn bool Dtk::Core::DConfigFile::load(const QString &localPrefix = QString())
@brief 解析配置文件
@param[in] localPrefix 为目录前缀
@return
@fn bool Dtk::Core::DConfigFile::load(QIODevice *meta, const QList<QIODevice*> &overrides)
@brief 解析配置文件流
@param[in] meta 为原型流
@param[in] overrides 为覆盖机制查找的文件流
@return
@fn bool Dtk::Core::DConfigFile::save(const QString &localPrefix = QString(), QJsonDocument::JsonFormat format = QJsonDocument::Indented, bool sync = false) const
@brief 保存缓存的值到磁盘中
@param[in] format 保存格式
@param[in] sync 是否立即刷新
@return
@fn bool Dtk::Core::DConfigFile::isValid() const
@brief 检测配置文件是否有效
@return
@fn QVariant Dtk::Core::DConfigFile::value(const QString &key, DConfigCache *userCache = nullptr) const
@brief DConfigFile::value
@param[in] key 配置项名称
@param[in] userCache 用户缓存,当key为全局项时, \a userCache 不会被使用
@return
@fn QVariant Dtk::Core::DConfigFile::cacheValue(DConfigCache *userCache, const QString &key) const
@brief DConfigFile::cacheValue 获取指定用户缓存的配置项值,若无此配置项的用户缓存值,返回无效值
@param[in] key 配置项名称
@param[in] userCache 用户缓存,当key为全局配置项时, \a userCache 不会被使用
@return
@fn bool Dtk::Core::DConfigFile::setValue(const QString &key, const QVariant &value, const QString &callerAppid, DConfigCache *userCache = nullptr)
@brief 设置缓存中的值
@param[in] key 配置项名称
@param[in] value 需要设置的值
@param[in] uid 设置时的用户id
@param[in] appid 设置时的应用id
@return 为true时表示重新设置了新值,false表示没有设置
@fn DConfigCache* Dtk::Core::DConfigFile::createUserCache(const uint uid)
@brief 创建用户缓存
@fn DConfigCache* Dtk::Core::DConfigFile::globalCache() const
@brief 返回全局缓存
@return
@fn DConfigMeta* Dtk::Core::DConfigFile::meta()
@brief 返回原型对象
@return
*/
/*!
@class Dtk::Core::DConfigMeta dconfigfile.h
@brief 提供配置文件的原型和覆盖机制的访问接口
@fn virtual DConfigFile::Version Dtk::Core::DConfigMeta::version() const = 0
@brief 返回配置版本信息
@return
@fn virtual void Dtk::Core::DConfigMeta::setVersion(quint16 major, quint16 minor) = 0
@brief 设置配置版本信息
@param[in] major 主板本号
@param[in] minor 次版本号
@fn virtual bool Dtk::Core::DConfigMeta::load(const QString &localPrefix = QString()) = 0
@brief 解析配置文件
@param[in] localPrefix 为目录前缀
@return
@fn virtual bool Dtk::Core::DConfigMeta::load(QIODevice *meta, const QList<QIODevice*> &overrides) = 0
@brief 解析配置文件流
@param[in] meta 为原型流
@param[in] overrides 为覆盖机制查找的文件流
@return
@fn virtual QStringList Dtk::Core::DConfigMeta::keyList() const = 0
@brief 返回配置内容的所有配置项
@return
@fn virtual DConfigFile::Flags Dtk::Core::DConfigMeta::flags(const QString &key) const = 0
@brief 返回指定配置项的特性
@param[in] key 配置项名称, NoOverride为此配置项不可被覆盖, Global为忽略用户身份
@return
@fn virtual DConfigFile::Permissions Dtk::Core::DConfigMeta::permissions(const QString &key) const = 0
@brief 返回指定配置项的权限
@param[in] key 配置项名称
@return
@fn virtual DConfigFile::Visibility Dtk::Core::DConfigMeta::visibility(const QString &key) const = 0
@brief 返回指定配置项的可见性
@param[in] key 配置项名称
@return
@fn virtual int Dtk::Core::DConfigMeta::serial(const QString &key) const = 0
@brief 返回配置项的单调递增值
@param[in] key 配置项名称
@return -1为无效值,表明没有配置此项
@fn virtual QString Dtk::Core::DConfigMeta::displayName(const QString &key, const QLocale &locale) = 0
@brief 返回指定配置项的显示名
@param[in] key 配置项名称
@param[in] locale 为语言版本
@return
@fn virtual QString Dtk::Core::DConfigMeta::description(const QString &key, const QLocale &locale) = 0
@brief 返回指定配置项的描述信息
@param[in] key 配置项名称
@param[in] locale 为语言版本
@return
@fn virtual QString Dtk::Core::DConfigMeta::metaPath(const QString &localPrefix = QString(), bool *useAppId = nullptr) const = 0
@brief 返回描述文件的路径
@param[in] localPrefix 目录的所有需要查找的覆盖机制目录
@param[in] useAppId 是否不使用通用目录
@return
@fn virtual QStringList Dtk::Core::DConfigMeta::allOverrideDirs(const bool useAppId, const QString &prefix = QString()) const = 0
@brief 获得前缀为 `prefix` 目录的所有需要查找的覆盖机制目录
@param[in] useAppId 是否不使用通用目录
@param[in] prefix 目录的应用或公共库的所有覆盖机制目录
@return
@fn virtual QVariant DConfigMeta::value(const QString &key) const = 0
@brief meta初始值经过覆盖机制覆盖后的原始值
@param[in] key 配置项名称
@return
@fn static QStringList genericMetaDirs(const QString &localPrefix = QString())
@brief 获取应用无关配置存储的目录
@param[in] localPrefix 配置的目录前缀
@return 返回应用无关配置存储的目录列表
@fn static QStringList applicationMetaDirs(const QString &localPrefix, const QString &appId)
@brief 获取应用配置存储的目录
@param[in] localPrefix 配置的目录前缀
@param[in] appId 应用唯一标识
@return 返回存储应用配置的目录列表
*/
/*!
@class Dtk::Core::DConfigCache dconfigfile.h
@brief 提供配置文件的用户和全局运行缓存访问接口
@fn virtual bool Dtk::Core::DConfigCache::load(const QString &localPrefix = QString()) = 0
@brief 解析缓存配置文件
@return
@fn virtual bool Dtk::Core::DConfigCache::load(const QString &localPrefix = QString()) = 0
@brief 解析缓存配置文件
@return
@fn virtual bool Dtk::Core::DConfigCache::save(const QString &localPrefix = QString(), QJsonDocument::JsonFormat format = QJsonDocument::Indented, bool sync = false) = 0
@brief 保存缓存的值到磁盘中
@param[in] localPrefix 为目录前缀
@param[in] format 保存格式
@param[in] sync 是否立即刷新
@return
@fn virtual bool Dtk::Core::DConfigCache::isGlobal() const = 0
@brief 是否是全局缓存
@return
@fn virtual void Dtk::Core::DConfigCache::remove(const QString &key) = 0
@brief 删除缓存中的配置项
@param[in] key 配置项名称
@return
@fn virtual QStringList Dtk::Core::DConfigCache::keyList() const = 0
@brief 返回配置内容的所有配置项
@return
@fn virtual bool Dtk::Core::DConfigCache::setValue(const QString &key, const QVariant &value, const int serial, const uint uid, const QString &callerAppid) = 0
@brief 设置缓存中的值
@param[in] key 配置项名称
@param[in] value 需要设置的值
@param[in] uid 设置时的用户id
@param[in] callerAppid 设置时的应用id
@return 为true时表示重新设置了新值,false表示没有设置。
@fn virtual QVariant Dtk::Core::DConfigCache::value(const QString &key) const = 0
@brief 获取缓存中的值
@param[in] key 配置项名称
@return
@fn virtual int Dtk::Core::DConfigCache::serial(const QString &key) const = 0
@brief 返回配置项的单调递增值
@param[in] key 配置项名称
@return -1为无效值,表明没有配置此项
@fn virtual uint Dtk::Core::DConfigCache::uid() const = 0
@brief 用户标识,为全局缓存时,uid为非用户标识的特定值
@return
@fn virtual void setCachePathPrefix(const QString &prefix) = 0
@brief 指定缓存位置前缀,缓存访问所需的权限及区分不同缓存的位置由调用者考虑,其默认值参考配置策略规范
@param[in] prefix 缓存位置的前缀
*/

View File

@ -0,0 +1,361 @@
/*!
@~chinese
@file include/global/ddesktopentry.h
@ingroup dglobal
@class Dtk::Core::DDesktopEntry ddesktopentry.h
@brief 处理desktop文件的接口
@details
## 概述
DDesktopEntry提供了处理XDG desktop读写的方法的接口,这个Class类似于QSettings。
有关该规范本身的更多详细信息,请参阅:
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
项目目录结构在同一目录下
## CMakeLists.txt
```cmake
cmake_minimum_required(VERSION 3.1.0) # 指定cmake最低版本
project(example1 VERSION 1.0.0 LANGUAGES CXX) # 指定项目名称, 版本, 语言 cxx就是c++
set(CMAKE_CXX_STANDARD 11) # 指定c++标准
set(CMAKE_CXX_STANDARD_REQUIRED ON) # 指定c++标准要求,至少为11以上
set(target example1) # 指定目标名称
set(CMAKE_AUTOMOC ON) # support qt moc # 支持qt moc
set(CMAKE_AUTORCC ON) # support qt resource file # 支持qt资源文件
set(CMAKE_AUTOUIC ON) # support qt ui file # 支持qt ui文件(非必须)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # support clangd # 支持 clangd
if (CMAKE_VERSION VERSION_LESS "3.7.0") # 如果cmake版本小于3.7.0
set(CMAKE_INCLUDE_CURRENT_DIR ON) # 设置包含当前目录
endif()
find_package(Qt5 COMPONENTS Core REQUIRED) # 寻找Qt5组件Core
find_package(Dtk COMPONENTS Core REQUIRED) # 寻找Dtk组件Core
add_executable(${target} # 生成可执行文件
main.cpp
)
target_link_libraries(${target} PRIVATE # 添加需要链接的共享库
Qt5::Core
dtkcore
)
```
## main.cpp
```cpp
#include <QDebug>
#include <QString>
#include <DDesktopEntry>
#include <QFile>
DCORE_USE_NAMESPACE // 使用Dtk Core命名空间
const QString fileContent = { QStringLiteral(R"desktop(# A. Example Desktop Entry File
[Desktop Entry]
Version=1.0
Type=Application
Name=Foo Viewer
Name[zh_CN]=福查看器
Comment=The best viewer for Foo objects available!
# Next line have an extra " character
Comment[zh_CN]=最棒的 "福 查看器!
TryExec=fooview
Exec=fooview %F
Icon=fooview
MimeType=image/x-foo;
Actions=Gallery;Create;
[Desktop Action Gallery]
Exec=fooview --gallery
Name=Browse Gallery
[Desktop Action Create]
Exec=fooview --create-new
Name=Create a new Foo!
Icon=fooview-new
)desktop") };
int main(int argc, char *argv[])
{
QFile file("example1.desktop");
// 尝试打开文件
if(!file.open(QIODevice::WriteOnly | QIODevice::Text)){
qDebug()<<"文件打开失败";
}
const QString fileName = file.fileName();
QTextStream ts(&file);
ts << fileContent;
file.close();
QFile::exists(fileName);
// 打开一个fileName为example1.desktop的文件
QScopedPointer<DDesktopEntry> desktopFile(new DDesktopEntry(fileName));
// 获取desktop中所有组并返回列表对应"Desktop Entry"、"Desktop Action Gallery"、"Desktop Action Create"三组
QStringList allGroups = desktopFile->allGroups();
qDebug() << QString("Desktop 文件共有%1组").arg(allGroups.count());
// 调用allGroups函数传入true保持读取desktop文件时的顺序不变获取第0组
qDebug() << QString("Desktop 文件第0组为: %1").arg(desktopFile->allGroups(true)[0]);
// 获取key=NamelocaleKey=zh_CN的值即Name[zh_CN]=福查看器
qDebug() << QString("Name[zh_CN]=%1") \
.arg(desktopFile->localizedValue("Name", "zh_CN"));
// 获取key为Nam,localeKey为empty的值empty表示没有localeKey即Name=Foo Viewer
qDebug() << QString("Name=%1") \
.arg(desktopFile->localizedValue("Name", "empty"));
// 获取Desktop Entry组下的所有key即"Actions", "Comment", "Comment[zh_CN]", "Exec", "Icon", "MimeType", "Name", "Name[zh_CN]", "TryExec", "Type", "Version"
qDebug() << QString("Desktop Entry组下的所有key: ") \
<< desktopFile->keys("Desktop Entry");
// 设置 key 为 Name的值为"Bar Viewer",默认组是"Desktop Entry"
desktopFile->setRawValue("Bar Viewer", "Name");
// 设置 key 为 NamelocaleKey为zh_CN的值为霸查看器默认组是"Desktop Entry"
desktopFile->setLocalizedValue("霸查看器", "zh_CN", "Name");
// 检查 section 中是否包 key 为 Semicolon 的值,包含 key 返回true; 否则返回false默认组是Desktop Entry
qDebug() << QString("Desktop Entry组是否包key是Semicolon: ") \
<< desktopFile->contains("Semicolon", "Desktop Entry");
// 设置key为Semicolon的值为";grp\\;2;grp3;",默认组是"Desktop Entry"
desktopFile->setRawValue(";grp\\;2;grp3;", "Semicolon");
// 返回给定 section 中与给定 key 关联的字符串的列表。如果destkop不包含为该键的项,则函数返回一个空字符串列表。 默认组是Desktop Entry
qDebug() << QString("Desktop Entry组中Semicolon对应值的字符串列表: ") \
<< desktopFile->stringListValue("Semicolon");
// 再次检查 section 中是否包 key 为 Semicolon 的值此时为true
qDebug() << QString("Desktop Entry组是否包key是Semicolon: ") \
<< desktopFile->contains("Semicolon", "Desktop Entry");
// 删除desktop中 section 中 key 对应的值,默认组是"Desktop Entry"
desktopFile->removeEntry("Semicolon", "Desktop Entry");
// 再次检查 section 中是否包 key 为 Semicolon 的值此时为false
qDebug() << QString("Desktop Entry组是否包key是Semicolon: ") \
<< desktopFile->contains("Semicolon", "Desktop Entry");
// 将数据回写到desktop文件。 true表示写成功; 否则返回false
if (desktopFile->save())
{
qDebug() << "文件保存成功";
} else {
qDebug() << "文件保存失败";
}
return 0;
}
```
结果如下图
![example](/docs/src/ddesktopentry_example1.png)
@enum Dtk::Core::DDesktopEntry::EntryType
@brief 桌面入口文件的类型
@var Dtk::Core::DDesktopEntry::Unknown
@brief 未知的桌面文件类型。可能是无效的
@var Dtk::Core::DDesktopEntry::Application
@brief 该文件描述应用程序
@var Dtk::Core::DDesktopEntry::Link
@brief 该文件描述URL
@var Dtk::Core::DDesktopEntry::Directory
@brief 该文件描述目录设置
@var Dtk::Core::DDesktopEntry::ServiceType
@brief KDE特定类型。规范中提到过, 所以这里也列出了
@var Dtk::Core::DDesktopEntry::Service
@brief KDE特定类型。规范中提到过, 所以这里也列出了
@var Dtk::Core::DDesktopEntry::FSDevice
@brief KDE特定类型。规范中提到过, 所以这里也列出了
@enum Dtk::Core::DDesktopEntry::ValueType
@brief 值的类型
@var Dtk::Core::DDesktopEntry::Unparsed
@brief 未解析的值
@var Dtk::Core::DDesktopEntry::String
@brief 字符串
@var Dtk::Core::DDesktopEntry::Strings
@brief 字符串数组
@var Dtk::Core::DDesktopEntry::Boolean
@brief 布尔值
@var Dtk::Core::DDesktopEntry::Numeric
@brief 数字
@var Dtk::Core::DDesktopEntry::NotExisted
@brief 不存在
@enum Dtk::Core::DDesktopEntry::Status
@brief desktop文件的解析状态
@var Dtk::Core::DDesktopEntry::NoError
@brief 没有错误发生
@var Dtk::Core::DDesktopEntry::AccessError
@brief 发生访问错误(例如, 试图写入只读文件)
@var Dtk::Core::DDesktopEntry::FormatError
@brief 发生格式错误(例如, 加载格式错误的desktop文件)
@fn Dtk::Core::DDesktopEntry::DDesktopEntry(const QString &filePath) noexcept
@brief DDesktopEntry构造函数
@fn bool Dtk::Core::DDesktopEntry::save() const
@brief 将数据回写到desktop文件。
@return true表示写成功; 否则返回false
@fn Status Dtk::Core::DDesktopEntry::status() const
@brief Get data parse status
@return 返回一个状态码, 表示DDesktopEntry遇到的第一个错误, 如果没有错误发生, 则返回QSettings::NoError。请注意, DDesktopEntry会延迟执行某些操作。
@fn QStringList Dtk::Core::DDesktopEntry::keys(const QString &section = "Desktop Entry") const
@brief 根据 `section` 返回全部键值
@return 返回所有的键值
@fn QStringList Dtk::Core::DDesktopEntry::allGroups(bool sorted = false) const
@brief 获取desktop中所有组的列表。如果 `sorted` 设置为true, 则返回结果将保持读取desktop文件时的顺序不变。
@return 返回所有的组.
@fn bool Dtk::Core::DDesktopEntry::contains(const QString &key, const QString &section = "Desktop Entry") const
@brief 检查desktop文件是否有给定的 `section` 包含给定的 `key`
@return 如果desktop在 `section` 包含 `key` 返回true; 否则返回false。
@fn QString Dtk::Core::DDesktopEntry::name() const
@brief 返回“Desktop Entry”部分下的“Name”键的本地化字符串值。这等价于调用localizedValue("Name")。
@return 返回“Desktop Entry”部分下的“Name”键的本地化字符串值。
@sa localizedValue(), genericName(), ddeDisplayName()
@fn QString Dtk::Core::DDesktopEntry::genericName() const
@brief 返回"Desktop Entry"部分下的"GenericName"键的本地化字符串值。它等价于调用localizedValue("GenericName")。如果是“GenericName”不存在。则不会回退到“Name”。
@return 返回"Desktop Entry"部分下的"GenericName"键的本地化字符串值。
@sa localizedValue(), name(), ddeDisplayName()
@fn QString Dtk::Core::DDesktopEntry::ddeDisplayName() const
@brief 为DDE应用程序专门显示名称
@details 这将检查“X-Deepin-Vendor”,并将返回本地化的字符串值“GenericName”
"X-Deepin-Vendor"是"deepin",否则它将返回"Name"的本地化字符串值。
@return 返回专门用于DDE应用程序的显示名称
@sa localizedValue(), name(), genericName()
@fn QString Dtk::Core::DDesktopEntry::comment() const
@brief 返回“Desktop Entry”部分下的“Comment”键的本地化字符串值。这等价于调用localizedValue("Comment")。
@return 返回“Desktop Entry”部分下的“Comment”键的本地化字符串值。
@sa localizedValue()
@fn QString Dtk::Core::DDesktopEntry::rawValue(const QString &key, const QString &section = "Desktop Entry", const QString &defaultValue = QString()) const
@brief 返回 `section` 中与给定 `key` 关联的原始字符串值。如果desktop不包含具有该键的项, 则函数返回一个构造好的 `defaultValue`。
@return 返回 `section` 中与给定 `key` 相关联的原始字符串值。
@sa stringValue() localizedValue() stringListValue()
@fn QString Dtk::Core::DDesktopEntry::stringValue(const QString &key, const QString &section = "Desktop Entry", const QString &defaultValue = QString()) const
@brief 返回 `section` 与给定 `key` 关联的未转义字符串值。如果desktop不包含键值为0的项, 则函数返回一个构造好的 `defaultValue`。
@return 返回 `section` 中与给定 `key` 相关联的未转义字符串值。
@sa rawValue() localizedValue() stringListValue()
@fn QString Dtk::Core::DDesktopEntry::localizedValue(const QString &key, const QString &localeKey = "default", const QString &section = "Desktop Entry", const QString& defaultValue = QString()) const
@brief 返回与 `section` 中给定的 `key` 和 `localeKey` 相关联的本地化字符串值。
@details
如果找不到给定的 `localeKey` ,它将回退到"C",如果仍然找不到,将回退 `key` 没有`localeKey`部分。。
如果destkop不包含 `key` 值为0的项,则函数返回一个构造好的 `defaultValue`。
@return 返回 `section` 中与给定的 `key` 和 `localeKey` 关联的本地化字符串值。
@sa rawValue() stringValue() stringListValue()
@fn QString Dtk::Core::DDesktopEntry::localizedValue(const QString &key, const QLocale &locale, const QString &section = "Desktop Entry", const QString& defaultValue = QString()) const
@brief 返回与给定的 `key` 和 `section` 中的区域设置相关联的本地化字符串值。
@details
如果找不到给定的 `localeKey` ,它将回退到"C",如果仍然找不到,将回退 `key` 没有`localeKey`部分。
如果destkop不包含 `key` 值为0的项,则函数返回一个构造好的 `defaultValue`。
@return 返回 `section`中 与给定的 `key` 和 `locale` 设置相关联的本地化字符串值。
@sa rawValue() stringValue() stringListValue()
@fn QStringList Dtk::Core::DDesktopEntry::stringListValue(const QString &key, const QString &section = "Desktop Entry") const
@brief 返回给定 `section` 中与给定 `key` 关联的字符串的列表。如果destkop不包含为该键的项,则函数返回一个空字符串列表。
@return 返回给定 `section` 中与给定 `key` 关联的字符串的列表。
@sa rawValue() stringValue() localizedValue()
@fn bool Dtk::Core::DDesktopEntry::setRawValue(const QString &value, const QString &key, const QString& section = "Desktop Entry")
@brief 设置给定 `section` 中与给定 `key` 关联的原始字符串值。
@fn bool Dtk::Core::DDesktopEntry::setStringValue(const QString &value, const QString &key, const QString& section = "Desktop Entry")
@brief 设置给定 `section` 中与给定 `key` 关联的字符串
@fn bool Dtk::Core::DDesktopEntry::setLocalizedValue(const QString &value, const QString& localeKey, const QString &key, const QString& section = "Desktop Entry")
@brief 设置给定的 `key` 和 `section` 中的区域设置相关联的本地化字符串值。
@fn bool Dtk::Core::DDesktopEntry::removeEntry(const QString &key, const QString &section = "Desktop Entry");
@brief 删除desktop中 `section` 与 `key` 对应的值
@fn static QString& Dtk::Core::DDesktopEntry::escape(QString &str)
@brief 支持转义序列`\s`、`\n`、`\t`、`\r`和`\\`表示值
@details string和localestring类型的值支持转义序列`\s`、`\n`、`\t`、`\r`和`\\`,分别表示ASCII空格、换行符、制表符、回车和反斜杠。
@fn static QString& Dtk::Core::DDesktopEntry::escapeExec(QString &str)
@brief 必须将参数括在双引号之间,并对双引号字符进行转义。
@details
| 原字符 | 转义后 |
|------|---------|
| \` | "`" |
| $ | "$" |
| \ | "\" |
在它前面加上一个额外的反斜杠字符。实现必须在扩展字段代码之前和之前撤销引用,将参数传递给可执行程序。
@note 类型为string的值的通用转义规则规定,反斜杠字符也可以转义为("\\")和这个转义规则应用在引用规则之前。<br>
因此,要明确地表示在desktop文件中,引号参数中的文字反斜杠字符 <br>
要求使用四个连续的反斜杠字符("\\\\")。同样,在桌面入口文件中引用参数中的美元符号表示为("\\$")。
@fn static QString& Dtk::Core::DDesktopEntry::unescape(QString &str, bool unescapeSemicolons = false)
@brief 对于类型为string和localestring的值,支持转义序列`\s`、`\n`、`\t`、`\r`和`\\`,分别表示ASCII空格、换行符、制表符、回车符和反斜杠。
@details 有些键可以有多个值。这种情况下,`key` 的值被指定为复数形式:
例如,字符串。多个值应该用分号分隔,`key` 的值可以选择以分号结尾。空字符串必须以分号结尾。
这些值中的分号需要使用`\;`转义。
有关该规范本身的更多详细信息,请参阅:
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#value-types
@fn static QString& Dtk::Core::DDesktopEntry::unescapeExec(QString &str)
@brief 必须将参数括在双引号之间,并对双引号字符进行转义,
@details
| 原字符 | 转义后 |
|------|---------|
| \` | "`" |
| $ | "$" |
| \ | "\" |
在它前面加上一个额外的反斜杠字符。实现必须在扩展字段代码之前和之前撤销引用,将参数传递给可执行程序。
保留字符:
| 功能 | 字符 |
|---------------------|---------|
| space | " " |
| tab | |
| newline | |
| double quote | |
| single quote | "'" |
| backslash character | "\" |
| greater-than sign | ">" |
| less-than sign | "<" |
| tilde | "~" |
| vertical bar | \| |
| ampersand | "&" |
| semicolon | ";" |
| dollar sign | "$" |
| asterisk | "*" |
| question mark | "?" |
| hash mark | "#" |
| parenthesis | "(" 和 ")" |
| backtick character | "`" |
@note 类型为string的值的通用转义规则规定 <br>
反斜杠字符也可以转义为("\\"),而且转义规则在引号规则之前应用。<br>
因此,要在desktop文件的引号参数中明确表示字面上的反斜杠字符,需要使用四个连续的反斜杠字符(“\\\\”)。<br>
同样,在desktop文件中,引号参数中的美元符号可以明确地表示为("\\$")。
@fn bool Dtk::Core::DDesktopEntry::setStatus(const Status &status)
@brief 设置desktop文件解析状态
*/

View File

@ -0,0 +1,51 @@
/*!
@~chinese
@ingroup dglobal
@file include/global/dlicenseinfo.h
@class Dtk::Core::DLicenseInfo::DComponentInfo
@brief dcomponentinfo 是一组用于查询组件所用开源协议信息的类
@fn Dtk::Core::DLicenseInfo::DComponentInfo::DComponentInfo(DObject *parent)
@brief 组件信息类的构造函数
@param[in] parent 组件信息类的父对象
@fn QString Dtk::Core::DLicenseInfo::DComponentInfo::name()
@brief 获取组件的名称
@fn QString Dtk::Core::DLicenseInfo::DComponentInfo::version()
@brief 获取组件的版本号
@fn QString Dtk::Core::DLicenseInfo::DComponentInfo::copyRight()
@brief 获取组件的授权信息
@fn QString Dtk::Core::DLicenseInfo::DComponentInfo::licenseName()
@brief 获取组件的所用开源许可协议名称
@class Dtk::Core::DLicenseInfo
@brief dlicenseinfo是一组用于查询应用所用开源许可协议相关信息的类
@fn Dtk::Core::DLicenseInfo::DLicenseInfo(DObject *parent)
@brief 开源许可协议信息类的构造函数
@param[in] parent 开源许可协议信息类的父对象
@fn bool Dtk::Core::DLicenseInfo::loadContent(const QByteArray &content)
@brief 通过内容content加载协议
@return 0 加载失败
@return 1 加载成功
@fn bool Dtk::Core::DLicenseInfo::loadFile(const QString &file)
@brief 通过文件file加载协议
@return 0 加载失败
@return 1 加载成功
@fn void Dtk::Core::DLicenseInfo::setLicenseSearchPath(const QString &path)
@brief 设置协议内容路径path
@fn QByteArray Dtk::Core::DLicenseInfo::licenseContent(const QString &licenseName)
@brief 获取协议名为licenseName的内容
@fn DLicenseInfo::DComponentInfos Dtk::Core::DLicenseInfo::componentInfos()
@brief 获取组件的相关信息
*/

View File

@ -0,0 +1,307 @@
/*!
@~chinese
@ingroup dglobal
@file include/global/dsysinfo.h
@class Dtk::Core::DSysInfo
@brief dsysinfo 是一组用于查询系统信息的静态类
@details
## 概述
dsysinfo是一组用于查询系统信息的静态类
项目目录结构如下:
```bash
├── CMakeLists.txt
└── main.cpp
```
## CMakeLists.txt
```cmake
cmake_minimum_required(VERSION 3.13) # cmake版本要求
set (VERSION "1.0.0" CACHE STRING "define project version") # 定义项目版本
set(BIN_NAME test) # 定义项目名称
project(test) # 定义项目名称
file(GLOB_RECURSE SRCS "*.h" "*.cpp") # 定义项目源文件
find_package(Qt5 REQUIRED COMPONENTS Core) # 寻找Qt5
find_package(DtkCore REQUIRED) # 寻找DtkCore
add_executable(test
main.cpp # 源文件
)
target_link_libraries(test PRIVATE
${DtkCore_LIBRARIES} # 链接DtkCore
Qt5::Core # 链接Qt5
)
```
## main.cpp
```cpp
#include <DSysInfo> // 引入DSysInfo
#include <qdebug.h> // 引入qdebug.h
DCORE_USE_NAMESPACE // 使用dtkcore命名空间
int main(int argc, char **argv) {
qDebug() << DSysInfo::deepinType(); // 打印deepin类型
qDebug() << DSysInfo::ProductType(); // 打印产品类型
return 0;
}
```
@enum Dtk::Core::DSysInfo::ProductType
@brief 产品信息
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::Deepin
@brief 深度操作系统
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::ArchLinux
@brief ArchLinux
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::CentOS
@brief CentOS
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::Debian
@brief Debian
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::Fedora
@brief Fedora
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::LinuxMint
@brief LinuxMint
@var Dtj::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::Manjaro
@brief Manjaro
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::openSUSE
@brief openSUSE
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::SailfishOS
@brief SailfishOS
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::Ubuntu
@brief Ubuntu
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::Uos
@brief UOS
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::Gentoo
@brief Gentoo
@var Dtk::Core::DSysInfo::ProductType Dtk::Core::DSysInfo::NixOS
@brief NixOS
@enum Dtk::Core::DSysInfo::DeepinType
@brief 深度操作系统版本
@var Dtk::Core::DSysInfo::DeepinType Dtk::Core::DSysInfo::UnknownDeepin
@brief 未知版本
@var Dtk::Core::DSysInfo::DeepinType Dtk::Core::DSysInfo::DeepinDesktop
@brief 桌面版
@var Dtk::Core::DSysInfo::DeepinType Dtk::Core::DSysInfo::DeepinProfessional
@brief deepin专业版, 现为uos专业版
@var Dtk::Core::DSysInfo::DeepinType Dtk::Core::DSysInfo::DeepinServer
@brief deepin服务器版本, 现为uos服务器版
@var Dtk::Core::DSysInfo::DeepinType Dtk::Core::DSysInfo::DeepinPersonal
@brief deepin个人版, 现为uos家庭版
@enum Dtk::Core::DSysInfo::LogoType
@brief 系统的logo类型
@var Dtk::Core::DSysInfo::LogoType Dtk::Core::DSysInfo::Normal
@brief 正常
@var Dtk::Core::DSysInfo::LogoType Dtk::Core::DSysInfo::Light
@brief 亮色
@var Dtk::Core::DSysInfo::LogoType Dtk::Core::DSysInfo::Symbolic
@brief 符号
@var Dtk::Core::DSysInfo::LogoType Dtk::Core::DSysInfo::Transparent
@brief 水印
@enum Dtk::Core::DSysInfo::OrgType
@brief 组织类型
@var Dtk::Core::DSysInfo::OrgType Dtk::Core::DSysInfo::Distribution
@brief 当前版本
@var Dtk::Core::DSysInfo::OrgType Dtk::Core::DSysInfo::Distributor
@brief 当前发行版
@var Dtk::Core::DSysInfo::OrgType Dtk::Core::DSysInfo::Manufacturer
@brief 当前发行版或设备的制造商
@enum Dtk::Core::DSysInfo::UosType
@brief UOS版本类型
@var Dtk::Core::DSysInfo::UosType Dtk::Core::DSysInfo::UosTypeUnknown
@brief 未知版本
@var Dtk::Core::DSysInfo::UosType Dtk::Core::DSysInfo::UosDesktop
@brief UOS桌面版
@var Dtk::Core::DSysInfo::UosType Dtk::Core::DSysInfo::UosServer
@brief UOS服务器版
@var Dtk::Core::DSysInfo::UosType Dtk::Core::DSysInfo::UosDevice
@brief UOS设备版
@var Dtk::Core::DSysInfo::UosType Dtk::Core::DSysInfo::UosTypeCount
@brief 记录枚举数量
@enum Dtk::Core::DSysInfo::UosEdition
@brief 详细uos版本
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosEditionUnknown
@brief 未知版本
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosProfessional
@brief UOS专业版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosHome
@brief UOS家庭版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosCommunity
@brief 社区版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosMilitary
@brief *
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosEnterprise
@brief UOS企业版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosEnterpriseC
@brief UOS行业版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosEuler
@brief UOS服务器欧拉版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosMilitaryS
@brief *
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosDeviceEdition
@brief UOS专用设备版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosEducation
@brief UOS教育版
@var Dtk::Core::DSysInfo::UosEdition Dtk::Core::DSysInfo::UosEditionCount
@brief 记录枚举数量
@enum Dtk::Core::DSysInfo::UosArch
@brief UOS使用的架构
@var Dtk::Core::DSysInfo::UosArch Dtk::Core::DSysInfo::UosArchUnknown
@brief 未知架构
@var Dtk::Core::DSysInfo::UosArch Dtk::Core::DSysInfo::UosAMD64
@brief x86_64
@var Dtk::Core::DSysInfo::UosArch Dtk::Core::DSysInfo::UosARM64
@brief arm64
@var Dtk::Core::DSysInfo::UosArch Dtk::Core::DSysInfo::UosMIPS64
@brief mips64
@var Dtk::Core::DSysInfo::UosArch Dtk::Core::DSysInfo::UosSW64
@brief sw_64
@fn static bool Dtk::Core::DSysInfo::isDeepin() //FIXME: 显示错乱 无法修复
@brief 是否为 deepin 或 uos 系统
@return 0 不是 deepin 或 uos 系统
@return 1 是 deepin 或 uos 系统
@fn static bool Dtk::Core::DSysInfo::isDDE()
@brief 是否使用 dde 桌面环境
@note 此方法仅在 linux 平台下可用
@fn static DeepinType Dtk::Core::DSysInfo::deepinType()
@brief deepin 系统类型
@note 此方法仅在 linux 平台下可用
@fn static QString Dtk::Core::DSysInfo::deepinTypeDisplayName (const QLocale &locale=QLocale::system())
@brief 显示的 deepin 发行版类型名称
@note 此方法仅在 linux 平台下可用
@fn static QString Dtk::Core::DSysInfo::deepinVersion()
@brief deepin 版本
@note 此方法仅在 linux 平台下可用
@fn static QString Dtk::Core::DSysInfo::deepinCopyright()
@brief deepin 开源许可协议
@note 此方法仅在 linux 平台下可用
@fn static UosEdition Dtk::Core::DSysInfo::uosEditionType()
@brief DSysInfo::osEditionType 版本类型 显示版本类型 专业版/个人版/社区版..
@note 根据 osBuild.B && osBuild.D
@note 此方法仅在 linux 平台下可用
@fn static UosArch Dtk::Core::DSysInfo::uosArch()
@brief DSysInfo::osArch 架构信息
@details(使用一个字节的二进制位, 从低位到高位) 【0x8 sw64】【0x4 mips64】【0x2 arm64】【0x1 amd64】
@note 此处架构是从 OsBuild 获取的系统版本的 Arch 信息, 并不是指硬件的 Arch 信息
@note 此方法仅在 linux 平台下可用
@fn static QString uosProductTypeName(const QLocale &locale=QLocale::system())
@brief DSysInfo::osProductTypeName 版本名称
@details ProductType[xx] 项对应的值, 如果找不到对应语言的默认使用 ProductType 的值(Desktop/Server/Device) locale 当前系统语言
@fn static QString Dtk::Core::DSysInfo::uosSystemName(const QLocale &locale=QLocale::system())
@brief SystemName[xx] 项对应的值
@details 如果找不到对应语言的默认使用 SystemName 的值 Uniontech OS locale 当前系统语言
@note 此方法仅在 linux 平台下可用
@fn static QString Dtk::Core::DSysInfo::function uosEditionName(const QLocale &locale=QLocale::system())
@brief 版本名称 EditionName[xx] 项对应的值
@details 如果找不到对应语言的默认使用 EditionName 的值(Professional/Home/Community...) locale 当前系统语言
@note 此方法仅在 linux 平台下可用
@fn static QString Dtk::Core::DSysInfo::spVersion()
@brief 阶段版本名称
@details 小版本号 A-BC-D 中 BC、 A.B.C 中的 B 返回 SP1-SPxx, 如果正式版返回空 X.Y.Z模式下暂不支持返回此版本号
@note minVersion.BC == 00 正式版本, minVersion.BC | minVersion.B == 01-99 SP1….SP99
@note 此方法仅在 linux 平台下可用
@fn static QString Dtk::Core::DSysInfo::udpateVersion()
@brief 更新版本名称 小版本号 A-BC-D 中 D、A.B.C 模式中的 C 返回 update1… update9, 如果正式版返回空 X.Y.Z 模式下暂不支持返回此版本号
@note minVersion.D == 0;正式版本 minVersion.D | minVersion.C == 1-9;update1… update9, updateA...updateZ
@note 此方法仅在 linux 平台下可用
@fn static QString Dtk::Core::DSysInfo::majorVersion()
@brief 主版本号 主版本号 【20】【23】【25】【26】【29】【30】
@note 此方法仅在 linux 平台下可用
@fn static QString Dtk::Core::DSysInfo::minorVersion()
@brief 小版本号 【ABCD】 ·[0-9]{4} 【A.B.C】 或者【X.Y.Z】
@note 此方法仅在 linux 平台下可用
@fn static QString Dtk::Core::DSysInfo::buildVersion()
@brief 小版本号 系统镜像批次号, 按时间顺序(不可回退)从100-999递增
@note 此方法仅在 linux 平台下可用
@fn static QString Dtk::Core::DSysInfo::distributionInfoPath ()
@brief 返回 distribution 文件地址 一般在`/usr/share/deepin/`目录下
@fn static QString Dtk::Core::DSysInfo::distributionInfoSectionName(OrgType type)
@brief 返回 distribution.info 文件中 SectionName 字段的值
@fn static Dtk::Core::DSysInfo::distributionOrgName(OrgType type=Distribution, const QLocale &locale=QLocale::system())
@brief 返回组织名称
@details 使用类型为Distribution来获取当前deepin distribution本身的名称
@fn static QPair<QString, QString>Dtk::Core::DSysInfo::distributionOrgWebsite(OrgType type=Distribution)
@brief 发行版组织的网站名称和网址。使用 type 作为 Distribution 获取当前 deepin 发行版本身的名称。
@fn static QString Dtk::Core::DSysInfo::distributionOrgLogo(OrgType orgType=Distribution, LogoType type=Normal, const QString &fallback=QString())
@brief 获得的组织logo路径, 如果不存在, 则返回给定的其他路径
@details 使用 type 作为 Distribution 获取当前 deepin 发行版本身的logo。
@fn static QString Dtk::Core::DSysInfo::operatingSystemName()
@brief 操作系统名
@fn static ProductType Dtk::Core::DSysInfo::productType()
@brief 产品类型
@fn static QString Dtk::Core::DSysInfo::productVersion()
@brief 产品版本
@fn static bool Dtk::Core::DSysInfo::isCommunityEdition()
@brief 检查当前版本是否是社区版 开发者可以使用这种方式来检查我们是否需要启用或禁用社区版或企业版的功能。
@details 目前的规则:
专业版、服务器版、个人版(DeepinType)将被视为企业版。<br>
Uos(ProductType)将被视为企业版。
@fn static QString Dtk::Core::DSysInfo::computerName()
@brief 电脑名
@fn static QString Dtk::Core::DSysInfo::cpuModelName()
@brief cpu模式名
@fn static qint64 Dtk::Core::DSysInfo::memoryInstalledSize()
@brief 内存安装大小
@fn static qint64 Dtk::Core::DSysInfo::memoryTotalSize()
@brief 实际内存大小
@fn static qint64 Dtk::Core::DSysInfo::systemDiskSize()
@brief 系统磁盘大小
@fn static QDateTime Dtk::Core::DSysInfo::bootTime ()
@brief 系统启动时间点
@fn static QDateTime Dtk::Core::DSysInfo::shutdownTime ()
@brief 上一次正常关机时间点(重启也会被记录在内)
@fn static qint64 Dtk::Core::DSysInfo::uptime()
@brief 系统启动到现在时长
@note 参见`cat /proc/uptime`命令
@fn static Arch Dtk::Core::DSysInfo::arch
@brief cpu架构信息
@note 此处架构是从gcc编译器获取的
*/

View File

@ -0,0 +1,50 @@
@page global global--dtk全局工具组件
# DTk globaldtk全局工具类
## dsysinfodtk系统信息工具类
[dsysinfo.h 详细文档](dsysinfo_8h.html)<br>
这里放一个最小化使用dsysinfo的例子:<br>
cmake:
```cmake
cmake_minimum_required(VERSION 3.13) # cmake版本要求
set (VERSION "1.0.0" CACHE STRING "define project version") # 定义项目版本
set(BIN_NAME test) # 定义项目名称
project(test) # 定义项目名称
file(GLOB_RECURSE SRCS "*.h" "*.cpp") # 定义项目源文件
find_package(Qt5 REQUIRED COMPONENTS Core) # 寻找Qt5
find_package(DtkCore REQUIRED) # 寻找DtkCore
add_executable(test
main.cpp # 源文件
)
target_link_libraries(test PRIVATE
${DtkCore_LIBRARIES} # 链接DtkCore
Qt5::Core # 链接Qt5
)
```
cpp:
```cpp
#include <DSysInfo> // 引入DSysInfo
#include <qdebug.h> // 引入qdebug.h
DCORE_USE_NAMESPACE // 使用dtkcore命名空间
int main(int argc, char **argv) {
qDebug() << DSysInfo::deepinType(); // 打印deepin类型
qDebug() << DSysInfo::ProductType(); // 打印产品类型
return 0;
}
```
其余的组件使用方法类似,这里就不一一列举了
@defgroup dglobal
@brief dtk设置全局工具组件
@details
dtk全局工具组件提供了设置全局工具的功能。<br>
包含以下功能:
* dsysinfodtk系统信息工具类
* dconfigdtk配置文件工具类

View File

@ -0,0 +1,70 @@
/*!
@~chinese
@ingroup dlog
@file include/log/AbstractAppender.h
AbstractAppender类是所有可以与Logger一起使用的日志appender的基础接口类。
@class Dtk::Core::AbstractAppender
@brief AbstractAppender为应用消息的线程安全、互斥保护的日志提供了一个通用的实现
@details AbstractAppender为应用消息的线程安全、互斥保护的日志提供了一个通用的实现,例如ConsoleAppender、FileAppender或其他的东西。<br>
AbstractAppender是抽象的,不能被实例化,但是你可以使用它的任何一个子类,或者根据你的选择创建一个自定义的日志appender。<br>
Appenders是逻辑设备,旨在通过调用`Logger::registerAppender()`附加到Logger对象。在每个来自应用程序的日志记录调用中,Logger对象都会依次调用所有在它身上注册的appender的`write()`函数。<br>
你可以子类化AbstractAppender来实现你喜欢的任何类型的日志目标。它可以是外部日志子系统(例如,*nix中的syslog)、XML文件、SQL数据库条目、D-Bus消息或任何你能想到的其他东西。<br>
对于简单的非结构化的纯文本日志(例如,到一个纯文本文件或到控制台输出),请子类化AbstractStringAppender而不是AbstractAppender,这将给你一个更方便的方法来控制日志输出的格式。
@fn AbstractAppender Dtk::Core::AbstractAppender::AbstractAppender()
@brief AbstractAppender构造函数
@fn AbstractAppender Dtk::Core::AbstractAppender::~AbstractAppender()
@brief AbstractAppender析构函数
@fn Logger::LogLevel Dtk::Core::AbstractAppender::detailsLevel()
@brief 返回appender的当前日志级别
@details 返回appender的当前日志级别.日志级别低于当前`detailsLevel()`的日志记录将被appender默认忽略,
并且不会被发送到其append()函数。
它提供了额外的日志灵活性,允许你为不同类型的日志设置不同的记录等级
@note 该函数是线程安全的
@sa setDetailsLevel()
@sa Logger::LogLevel
@return 日志记录等级
@fn void Dtk::Core::AbstractAppender::setDetailsLevel(Logger::LogLevel level)
@brief 设置当前appender的记录级别,默认记录级别为Logger::Debug
@note 该函数是线程安全的
@sa setDetailsLevel()
@sa Logger::LogLevel
@fn void Dtk::Core::AbstractAppender::setDetailsLevel(const QString &level)
@brief 设置当前appender的记录级别,这个函数是为了简化输入而提供的,它的行为与同名函数类似。
@sa AbstractAppender::setDetailsLevel(Logger::LogLevel level)
@sa setDetailsLevel()
@sa Logger::LogLevel
@fn void Dtk::Core::AbstractAppender::write(const QDateTime &time, Logger::LogLevel level, const char *file, int line, const char *func, const QString &category, const QString &msg)
@brief 尝试写入日志,这是由Logger对象调用的函数,用于向appender写入日志信息
@param[in] time 时间戳
@param[in] level 日志记录等级
@param[in] file 目标文件名
@param[in] line 要输出的行数
@param[in] func 输出的函数名称
@param[in] category 日志类别
@param[in] msg 输出信息
@note 该函数是线程安全的
@sa Logger::write()
@sa detailsLevel()
@fn void Dtk::Core::AbstractAppender::AbstractAppender::append(const QDateTime &timeStamp, Logger::LogLevel level, const char *file, int line,
const char *function, const QString &category, const QString &message) = 0
@brief 将日志记录写到logger实例中
@details 每次当用户试图使用`write()`函数向这个AbstractAppender实例写入消息时,都会调用这个函数。`write()`函数作为代理工作,只输出日志级别大于或等于当前`logLevel()`的消息
@note 当你实现一个自定义的appender时,需要重载这个函数。
@note 该函数不需要是线程安全的,因为它不会被Logger对象直接调用。`write()`函数作为代理,保护该函数不被并发调用。
@param[in] timeStamp 时间戳
@param[in] level 日志记录等级
@param[in] file 目标文件名
@param[in] line 要输出的行数
@param[in] function 输出的函数名称
@param[in] category 日志类别
@param[in] message 输出信息
*/

View File

@ -0,0 +1,60 @@
/*!
@~chinese
@ingroup dlog
@file include/log/AbstractStringAppender.h
@class Dtk::Core::AbstractStringAppender
@brief AbstractStringAppender类为处理纯文本格式的Appender提供了一个方便的基础日志
@details AbstractStringAppender是AbstractAppender类的简单扩展,
它提供了一种方便的方式来创建自定义日志应用程序, 该程序使用纯文本格式的日志.
它有`formattedString()`保护类型(不可直接被调用)函数, 可以根据`setFormat()`设置的格式来格式化日志参数。
@note 这个类不能直接实例化, 因为它包含从AbstractAppender类继承的纯虚函数。
@brief 关于自定义日志输出格式的更详细描述, 请参见setFormat()函数的文档
@sa AbstractStringAppender::setFormat()
@fn AbstractStringAppender Dtk::Core::AbstractStringAppender::AbstractStringAppender()
@brief 构建一个新的字符串appender对象
@fn QString Dtk::Core::AbstractStringAppender::format()
@brief 返回当前使用的format字符串
@details 默认记录格式为:`"%{time}{yyyy-MM-ddTHH:mm:ss.zzz} [%{type:-7}] <%{function}> %{message}\n"`
你可以使用setFormat()函数来设置不同的日志记录格式。
@sa AbstractStringAppender::setFormat()
@return 返回当前使用的format字符串
@fn void Dtk::Core::AbstractStringAppender::setFormat(const QString &format)
@brief 设置日志格式, 以便用这个appender向日志目标写入字符串。
@details
对于那些使用过标准sprintf函数的开发者来说, 字符串格式非常常见。
日志输出格式是一个简单的QString, 带有特殊的标记(以%符号开始), 在写日志记录时将被替换成它的内部含义。
控制标记以百分号(%)开始, 后面是{}括号内的命令(该命令描述了将被放入日志记录而不是标记的内容)。
可选的字段宽度参数可以在命令后直接指定(通过括号内的冒号), 有些命令需要一个额外的格式化参数(在第二个{}括号内)
字段宽度参数的工作原理与`QString::arg()`fieldWidth参数几乎相同(并在内部使用它),
例如, "%{type:-7}"将被替换为消息的左边填充的调试级别("Debug")或其他东西。更详细的描述请参考Qt文档。
@details 支持的标记:
| **标记** | **含义** | **备注** |
|:-----------:|:-----------------------------------------------------:|:-------------------------------------------------------------------:|
| %{time} | 时间戳。你可以使用标记后的第二个{}括号来指定你的自定义时间戳格式。默认格式:"HH:mm:ss.zzz" | "%{time}{dd-MM-yyyy, HH:mm}"可能被替换为 "20-9-2022, 21:24", 这取决于当前的日期和时间。 |
| %{type} | 日志级别。可能的日志级别在Logger::LogLevel枚举中显示。 | |
| %{Type} | 大写的日志级别 | |
| %{typeOne} | 一个字母的日志级别 | |
| %{TypeOne} | 一个大写字母的日志级别 | |
| %{File} | 记录日志的文件的完整源文件名(含路径), 使用 `__FILE__`预处理程序宏 | |
| %{file} | 简短的文件名(去除路径后的文件名) | |
| %{line} | 源文件中的行数。使用`__LINE__`预处理程序宏。 | |
| %{Function} | 调用`LOG_*`宏的函数的名称。使用Qt提供的`Q_FUNC_INFO`宏。 | |
| %{function} | 类似于%{Function}, 但使用 stripFunctionName 剥离了函数名。 | |
| %{message} | 日志内容 | |
| %{category} | 日志类别 | |
| %{appname} | 应用程序名称(由`QCoreApplication::applicationName()`函数返回) | |
| %{pid} | 应用程序的pid(由`QCoreApplication::applicationPid()`函数返回) | |
| %{threadid} | 线程ID | |
| %% | 转译为单`%`标记 | |
@fn static QString Dtk::Core::AbstractStringAppender::stripFunctionName(const char *name)
@brief 剥离长函数签名(由Q_FUNC_INFO宏添加)
@details 字符串处理掉了函数的返回类型、参数和模板参数, 这对于提高日志输出的可读性是非常有用的
@param[in] name 函数名称
@return 剥离的函数名称
*/

View File

@ -0,0 +1,23 @@
/*!
@~chinese
@ingroup dlog
@file include/log/ConsoleAppender.h
@class Dtk::Core::ConsoleAppender
@brief ConsoleAppender是简单的控制台appender将日志记录写入`std::cerr`输出流<br>
@details ConsoleAppender使用`[%{type:-7}] <%{function}> %{message}\n`作为默认输出格式。它类似于AbstractStringAppender,但不显示时间<br>
你可以通过使用`QT_MESSAGE_PATTERN`环境变量来修改ConsoleAppender的输出格式,而不用修改你的代码。
变量。如果你需要你的应用程序忽略这个环境变量,你可以调用`ConsoleAppender::ignoreEnvironmentPattern(true)`
@fn ConsoleAppender Dtk::Core::ConsoleAppender::ConsoleAppender()
@brief 构造函数,设置默认的日志格式为`[%{type:-7}] <%{function}> %{message}\n`
@fn virtual QString Dtk::Core::ConsoleAppender::format()
@brief 返回当前默认输出格式,可以调用父类的`setFormat()`来更改日志输出格式
@sa AbstractStringAppender::setFormat()
@fn void Dtk::Core::ConsoleAppender::ignoreEnvironmentPattern(bool ignore)
@brief 设置应用程序忽略环境变量来修改ConsoleAppender的输出格式,使用默认输出格式
@sa [QT_MESSAGE_PATTERN](https://doc.qt.io/qt-5/debug.html#warning-and-debugging-messages)
*/

View File

@ -0,0 +1,29 @@
/*!
@~chinese
@ingroup dlog
@file include/log/FileAppender.h
@class Dtk::Core::FileAppender
@brief 简单的文件appender,将日志记录写到纯文本文件中
@fn FileAppender Dtk::Core::FileAppender::FileAppender(const QString &fileName = QString())
@brief 构造函数,指定日志记录文件的文件名。
@fn QString Dtk::Core::FileAppender::fileName() const
@brief 返回由setFileName()设置的名称或返回FileAppender构造函数传入的fileName
@sa FileAppender::setFileName()
@fn void Dtk::Core::FileAppender::setFileName(const QString &s)
@brief 设置文件的名称。该名称可以没有路径,可以是相对路径,也可以是绝对路径
@sa FileAppender::fileName()
@fn qint64 Dtk::Core::FileAppender::size()
@brief 返回日志文件大小
@fn bool FileAppender::openFile()
@brief 打开日志记录文件
@fn void FileAppender::closeFile()
@brief 关闭日志记录文件
*/

176
docs/log/Logger.zh_CN.dox Normal file
View File

@ -0,0 +1,176 @@
/*!
@~chinese
@ingroup dlog
@file include/log/Logger.h
@class Dtk::Core::Logger Logger.h
@brief 非常简单但相当强大的组件,可用于记录你的应用程序活动。
@enum Dtk::Core::Logger::LogLevel
@brief 日志等级
@var Dtk::Core::Logger::LogLevel Dtk::Core::Logger::Trace
追踪级别,可用于大部分不需要的记录,用于内部代码追踪
@var Dtk::Core::Logger::LogLevel Dtk::Core::Logger::Debug
调试级别,用于软件的调试。
@var Dtk::Core::Logger::LogLevel Dtk::Core::Logger::Info
信息级别,可用于信息记录,这可能不仅对开发者有意义
@var Dtk::Core::Logger::LogLevel Dtk::Core::Logger::Warning
警告,可以用来记录你的应用程序检测到的一些非致命的警告
@var Dtk::Core::Logger::LogLevel Dtk::Core::Logger::Error
错误,可能是一个较大问题,导致你的程序工作出错,但不至于崩溃
@var Dtk::Core::Logger::LogLevel Dtk::Core::Logger::Fatal
致命错误,用于不可恢复的错误,在写入日志记录后立即崩溃应用程序(终止)
@fn Logger Dtk::Core::Logger::Logger()
@brief 构建Logger的实例。
@note 如果你只使用一个全局的logger实例,不需要手动使用这个构造函数,可以考虑使用logger宏来代替访问记录器实例
@fn Logger Dtk::Core::Logger::Logger(const QString &defaultCategory)
@brief 构建Logger的实例并设置Logger的默认类别
@note 如果你只使用一个全局的logger实例,不需要手动使用这个构造函数,
可以考虑使用logger宏来访问logger实例并调用setDefaultCategory方法
@sa Logger::Logger()
@sa Logger::setDefaultCategory()
@fn Logger Dtk::Core::Logger::~Logger()
@brief 析构函数
@note 你可能不需要直接使用这个函数。记录器的全局实例将在你的QCoreApplication执行结束后自动销毁
@fn static Logger* Dtk::Core::Logger::globalInstance()
@brief 返回Logger的全局对象
@note 在大多数情况下,你不应该直接使用这个函数。可以考虑使用 [logger](@ref logger) 宏来代替
@return Logger指针
@fn static QString Dtk::Core::Logger::levelToString(Logger::LogLevel level)
@brief 将LogLevel枚举值转换为其字符串表示
@sa Logger::LogLevel
@fn static LogLevel Dtk::Core::Logger::levelFromString(const QString &str)
@brief 将LogLevel字符串表示转换为枚举值
@note 字符串的比较是不分大小写的。如果提供的日志级别字符串不合法,则返回`Logger::Debug`的枚举值
@sa Logger::LogLevel
@sa Logger::levelToString()
@fn void Dtk::Core::Logger::registerAppender(AbstractAppender *appender)
@brief 注册appender来写入日志记录<br>
在写入日志的调用中(使用其中一个宏或`write()`函数),Logger遍历appender列表,并向每个appender写入日志记录。请查阅AbstractAppender文档以了解appenders的概念。
如果没有appender被添加到Logger中,它就会退回到记录到`std::cerr`流中。
@param[in] appender 要在Logger中注册的Appender
@note Logger对appender拥有所有权,它将在应用程序退出时删除它。因此,appender必须在堆上创建,以防止appender被重复销毁。
@sa Logger::registerCategoryAppender()
@sa Dtk::Core::AbstractAppender
@fn void Dtk::Core::Logger::registerCategoryAppender(const QString &category, AbstractAppender *appender)
@brief 注册appender,将日志记录写到特定的类别中<br>
@details 调用这个方法,你可以将一些appender与命名的类别联系起来。
在调用特定类别的日志写入时(直接调用带有类别参数的`write()`,写入默认类别,或使用特殊的`dCDebug()`、`dCWarning()`等宏),
Logger只将日志信息写入注册的类别appender列表中。<br>
你可以调用`logToGlobalInstance()`将所有类别的日志信息传递给全局的Logger实例Appender(使用`registerAppender()`注册)。
如果没有特定名称的类别应用程序被注册到记录器上,它就会退回到记录到`std::cerr` STL流中,这两种方法都有简单的警告信息。
@param[in] category 类别名称
@param[in] appender 要在Logger中注册的Appender
@note Logger对appender拥有所有权,它将在应用程序退出时删除它。根据这一点,appender必须在堆上创建,以防止appender被重复销毁。
@sa Logger::registerAppender()
@sa Logger::logToGlobalInstance()
@sa Logger::setDefaultCategory()
@fn void Dtk::Core::Logger::logToGlobalInstance(const QString &category, bool logToGlobal = false)
@brief 将一些日志类别与全局日志实例应用者联系起来。
如果logToGlobal设置为 "true",所有到指定类别的Logger的日志消息也将被写入全局日志实例appenders(使用`registerAppender()`注册)<br>
默认情况下,所有到特定类别的消息都只写到特定的类别应用者
(使用 `registerCategoryAppender()` 注册)
@param[in] category 类别名称
@param[in] logToGlobal 是否将日志写入全局日志appenders
@sa Logger::registerAppender()
@sa Logger::globalInstance()
@sa Logger::registerCategoryAppender()
@fn void Dtk::Core::Logger::setDefaultCategory(const QString &category);
QString defaultCategory()
@brief 设置默认的日志类别
所有到这个类别应用的日志信息也将被写入一般的日志实例应用(使用[registerAppender](@ref registerAppender)方法注册),反之亦然
特别是,任何对dDebug()宏的调用都将被视为类别日志
所以你不需要用dCDebug()宏来指定类别名称
要取消默认的类别,传递一个空字符串作为参数
@param[in] category 类别名称
@note "category "格式标记将被设置为所有这些消息的类别名称
@sa Dtk::Core::AbstractStringAppender::setFormat()
@sa Logger::defaultCategory()
@sa Logger::registerCategoryAppender()
@sa Logger::logToGlobalInstance()
@fn QString Dtk::Core::Logger::defaultCategory()
@brief 返回默认的日志类别名称
@sa Logger::setDefaultCategory()
@fn void Dtk::Core::Logger::write(const QDateTime &time, LogLevel level,
const char *file, int line,const char *func,
const char *category, const QString &msg)
@brief 写入日志记录。
将带有所提供参数的日志记录写给所有注册的应用
@param[in] time 时间戳
@param[in] level 日志记录等级
@param[in] file 目标文件名
@param[in] line 要输出的行数
@param[in] func 输出的函数名称
@param[in] category 日志类别
@param[in] msg 输出信息
@note 使用`Logger::Fatal`日志级别记录日志记录将导致调用STL `abort()`函数,
这将中断你的软件的运行并Core dump
@sa Logger::LogLevel
@sa Dtk::Core::AbstractAppender
@fn void Dtk::Core::Logger::write(LogLevel level, const char *file, int line,
const char *func, const char *category, const QString &msg)
@brief 这是为方便而提供的重载函数。它的行为与同名函数类似,此函数无需传入time参数
@note 这个函数使用了`QDateTime::currentDateTime()`用获得的当前时间戳
@sa Logger::write(const QDateTime &time, LogLevel level,
const char *file, int line,const char *func,
const char *category, const QString &msg)
@param[in] level 日志记录等级
@param[in] file 目标文件名
@param[in] line 要输出的行数
@param[in] func 输出的函数名称
@param[in] category 日志类别
@param[in] msg 输出信息
@fn QDebug Dtk::Core::Logger::write(LogLevel level, const char *file,
int line,const char *func, const char *category)
@brief 这是为方便而提供的重载函数。它的行为与同名函数类似,此函数无需传入message参数
@details 这个函数不接受任何日志信息作为参数。它返回的是可以使用流函数写入的`QDebug`对象<br>
例如,你可能想写:
@code
dDebug() << "This is the size" << size << "of the element" << elementName;
@endcode
而不是写为:
@code
dDebug(QString(QLatin1String("This is the size %1x%2 of the element %3")).arg(size.x()).arg(size.y()).arg(elementName));
@endcode
这样会更优雅一些<br>
请考虑阅读Qt参考文档,了解QDebug类的使用语法
@note 这个重载肯定是最好用的一个重载,但是代价是它会比其他的重载更为慢
@sa Logger::write(const QDateTime &time, LogLevel level,
const char *file, int line,const char *func,
const char *category, const QString &msg)
@param[in] level 日志记录等级
@param[in] file 目标文件名
@param[in] line 要输出的行数
@param[in] func 输出的函数名称
@param[in] category 日志类别
@fn void Dtk::Core::Logger:: writeAssert(const char *file, int line,
const char *func, const char *condition)
@brief 写入断言
@details 这个函数使用write()函数来写断言记录<br>
断言记录总是使用`Logger::Fatal`日志级别来写,这将导致程序的中止和核心转储(core dump)的生成(如果支持)
写入appenders的信息与传入参数相同,前缀为 `ASSERT:`
@param[in] file 目标文件名
@param[in] line 要输出的行数
@param[in] func 输出的函数名称
@note 不建议直接调用这个函数,你可以直接调用`LOG_ASSERT`宏,它将为这个函数提供所有需要的信息
@sa Logger::write(const QDateTime &time, LogLevel level,
const char *file, int line,const char *func,
const char *category, const QString &msg)
*/

View File

@ -0,0 +1,64 @@
/*!
@~chinese
@ingroup dlog
@file include/log/RollingFileAppender.h
@class Dtk::Core::RollingFileAppender
@brief RollingFileAppender类扩展了FileAppender,使日志文件在按照用户指定的频率进行滚动
@details
该类是基于`Log4Qt.DailyRollingFileAppender`类[Log4Qt](http://log4qt.sourceforge.net/)
并具有相同的日期模式格式<br>
例如,如果fileName设置为`/foo/bar`,DatePattern设置为每日滚动('.yyy-MM-dd'.log'),在2022-05-28的午夜。
日志文件`/foo/bar.log`将被复制到`/foo/bar.2022-05-28.log`,2022-05-29的日志将在`/foo/bar`中继续,直到第二天滚动<br>
logFilesLimit参数用于在滚动期间自动删除目录中最旧的日志文件。
(所以在任何时候,目录中都不会有超过logFilesLimit的最新日志文件存在)
@enum Dtk::Core::RollingFileAppender::DatePattern
@brief 日志频率
@var Dtk::Core::RollingFileAppender::DatePattern Dtk::Core::RollingFileAppender::MinutelyRollover
@brief 每分钟的日期模式字符串是`.yyyy-MM-dd-hh-mm`
@var Dtk::Core::RollingFileAppender::DatePattern Dtk::Core::RollingFileAppender::HourlyRollover
@brief 每小时的日期模式字符串是 `.yyyy-MM-dd-hh`
@var Dtk::Core::RollingFileAppender::DatePattern Dtk::Core::RollingFileAppender::HalfDailyRollover
@brief 每半天的日期模式字符串是`.yyyy-MM-dd-a`
@var Dtk::Core::RollingFileAppender::DatePattern Dtk::Core::RollingFileAppender::DailyRollover
@brief 每天的日期模式字符串是`.yyyy-MM-dd`
@var Dtk::Core::RollingFileAppender::DatePattern Dtk::Core::RollingFileAppender::WeeklyRollover
@brief 每周的日期模式字符串是`.'yyyy-ww`
@var Dtk::Core::RollingFileAppender::DatePattern Dtk::Core::RollingFileAppender::MonthlyRollover
@brief 每月的日期模式字符串是`.yyyy-MM`
@fn RollingFileAppender Dtk::Core::RollingFileAppender::RollingFileAppender()
@brief 构造函数,默认限制日志文件个数是0,默认日志文件大小是1024*1024*20=20m
@fn DatePattern Dtk::Core::RollingFileAppender::datePattern()
@brief 返回当前的滚动更新频率
@sa RollingFileAppender::DatePattern
@fn void Dtk::Core::RollingFileAppender::setDatePattern(DatePattern datePattern)
@brief 设置日志滚动频率
@sa RollingFileAppender::DatePattern
@fn void Dtk::Core::RollingFileAppender::setDatePattern(const QString &datePattern)
@brief 此重载是为了方便使用,可以传入一个滚动频率字符串
@sa RollingFileAppender::DatePattern
@sa RollingFileAppender::setDatePattern(DatePattern datePattern)
@fn QString Dtk::Core::RollingFileAppender::datePatternString()
@brief 以字符串形式,返回当前滚动频率
@fn void Dtk::Core::RollingFileAppender::setLogFilesLimit(int limit)
@brief 设置日志文件数量上限,最旧的文件会被滚动覆盖
@fn int Dtk::Core::RollingFileAppender::logFilesLimit()
@brief 返回设置的日志文件数量上限
@sa RollingFileAppender::setLogFilesLimit()
@fn int Dtk::Core::RollingFileAppender::setLogSizeLimit(int qint64)
@brief 设置日志文件单个文件大小上限
@fn qint64 Dtk::Core::RollingFileAppender::logSizeLimit()
@brief 返回设置的日志文件单个文件大小上限
@sa RollingFileAppender::setLogSizeLimit(int qint64)
*/

View File

@ -0,0 +1,41 @@
/*!
@~chinese
@ingroup dlog
@file include/log/LogManager.h
@class Dtk::Core::DLogManager
@brief DLogManager是dtk日志管理类,提供对日志的基础设置
@details 使用此类可以很方便的为自己的dtk程序加上日志,一般情况下应用如果需要写入日志只需要调用此类
调用相应的注册方法设置存储路径相关信息即可
@fn static void Dtk::Core::DLogManager::registerConsoleAppender()
@brief 注册默认的控制台记录器
@fn static void Dtk::Core::DLogManager::registerFileAppender()
@brief 注册默认的文件记录器默认的文件记录器类型为RollingFileAppender.
@note 输出日志默认文件位置为`~/.cache/<organizationName>/<applicationName>.log`如果获取 $HOME 环境变量失败将不写日志.
如果在创建程序的时候没有指定这两个name,如果未设置organizationName,则是 `~/.cache/<applicationName>/<applicationName>.log`
如果applicationName没有设置, 会fallback到进程二进制文件名
@sa DLogManager::setlogFilePath()
@fn static void Dtk::Core::DLogManager::registerJournaldAppender()
@brief 注册默认的journald记录器
@note 此方法只在linux下有效
@detials 默认输出文件位置为`/var/log/journal/<machine-id>.journal`,前提是此目录存在且有写权限,
如果目录不存在systemd将不会自动创建此目录并将日志写入到`/run/log/journal/<machine-id>.journal`中,此目录不支持持久化存储,
将在下次重启后丢失。
@note 查看日志可用`journalctl`命令,查看详细信息可用`journalctl -o verbose`命令也可以使用deepin 日志查看器查看
@fn static QString Dtk::Core::DLogManager::getlogFilePath()
@brief 获取当前的日志存储路径,包括文件名
@fn static void Dtk::Core::DLogManager::setlogFilePath(const QString &logFilePath)
@brief 设置log文件路径。如果文件存在且不是log文件类型(比如文件夹)会导致设置无效并输出一条警告。
@note 注意,此文件路径为包括具体文件名的绝对路径。需要此文件不存在或者存在且为有效类型(xxx.log),一般情况下无需手动指定路径。
@fn static void Dtk::Core::DLogManager::setLogFormat(const QString &format)
@brief 设置日志的格式,如果没有设置格式
@details 默认的格式为:`"%{time}{yyyy-MM-dd, HH:mm:ss.zzz} [%{type:-7}] [%{file:-20} %{function:-35} %{line}] %{message}\n"`
@sa Dtk::Core::AbstractStringAppender::format()
*/

84
docs/log/index.zh_CN.md Normal file
View File

@ -0,0 +1,84 @@
@page DLog dlog--DTK日志组件
# DlogDTK日志组件
## 简介
DTK日志组件提供了日志的输出、日志级别的设置、日志文件的设置等功能。为了简化日志的使用我们提供了两种使用方式一种是使用宏另一种是使用类。
但是更为建议使用宏的方式进行使用。因为使用宏可以输出更多的信息,比如文件名、函数名、行号等。
## 使用
### 宏
DTK日志组件提供了一系列的宏用于输出日志。这些宏的定义在dloggerdefs.h中
如果需要使用宏,则需要在你的代码中包含`DLog`文件。
@note DTK更推荐使用CPP标准引入头文件的方式即使用`#include <DLog>`的方式引入头文件,而不是使用`#include "xxxxx.h"`的方式引入头文件。
示例代码如下:
```cpp
#include <DLog>
#include <QCoreApplication>
DCORE_USE_NAMESPACE
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
#ifdef Q_OS_LINUX
DLogManager::registerJournalAppender();
#endif
DLogManager::registerConsoleAppender();
dDebug() << "this is a debug message";
return app.exec();
}
```
上述代码中我们使用了dDebug()宏用于输出一条debug级别的日志。在输出日志时我们可以使用`<<`运算符,将多个变量输出到日志中。
注意registerJournalAppender()仅在Linux平台下有效因为journal仅在Linux平台下有效。而registerConsoleAppender()则是在所有平台下都有效。
### 类
使用类的方式需要先创建一个logger对象然后使用logger对象的方法来输出日志具体请参见logger文档
## 注意事项
### 日志级别
DTK使用的日志级别与Qt的日志级别一致分别为Trace、Debug、Info、Warning、Error、Fatal。其中Trace是最低级别Fatal是最高级别。
与之不同的是journal的日志级别和DTK的日志级别不一致journal的日志级别分别为emergency、alert、critical、error、warning、notice、info、debug。
这是因为journal的日志级别是从syslog中继承过来的而syslog的日志级别是从BSD的syslog中继承过来的。而DTK的日志级别是从Qt的日志级别中继承过来的。
下表是DTK日志级别和journal日志级别的对应关系
| DTK值 | 序号 | 含义 | syslog值 | syslog序号 |
|---------|----|-------------------------------------|-------------|----------|
| dTrace | 0 | 追踪级别,可用于大部分不需要的记录,用于内部代码追踪 | 无 | |
| dDebug | 1 | 调试级别,用于软件的调试。 | LOG_DEBUG | 7 |
| dInfo | 2 | 信息级别,可用于信息记录,这可能不仅对开发者有意义 | LOG_INFO | 6 |
| dWarning | 3 | 警告,可以用来记录你的应用程序检测到的一些非致命的警告 | LOG_WARNING | 4 |
| dError | 4 | 错误,可能是一个较大问题,导致你的程序工作出错,但不至于崩溃 | LOG_ERR | 3 |
| dFatal | 5 | 致命错误,用于不可恢复的错误,在写入日志记录后立即崩溃应用程序(终止) | LOG_EMERG | 0 |
| | | | LOG_ALERT | 1 |
| | | | LOG_CRIT | 2 |
| | | | LOG_NOTICE | 6 |
### 日志文件
如果你选择使用journal作为日志输出那么你需要在系统中安装systemd一般的linux发行版都会自带systemd。并且需要确保`/var/log/journal/`
目录的存在否则journal会将日志写入到`/run/log/journal/`目录中。
如果你选择使用控制台作为日志输出,那么不会生成日志文件。
如果你选择使用文件作为日志输出,那么你需要确保你的日志文件所在的目录存在,否则会导致日志文件无法创建。
### 日志格式
如果你选择使用journal作为日志输出且使用宏的方式进行日志输出那么日志的格式为
`[时间] [进程ID] [线程ID] [日志级别] [文件名:行号] [函数名] [日志内容]`你仅需要关注日志内容即可。其他的信息都是journal自动添加的。
@defgroup dlog
@brief DTK日志组件
@details
DTK日志组件提供了日志的输出、日志级别的设置、日志文件的设置等功能。
对于DTK日志组件我们提供了两种使用方式一种是使用宏另一种是使用类。
但是更为建议使用宏的方式进行使用

View File

@ -0,0 +1,32 @@
/*!
@~chinese
@file include/settings/backend/dsettingsdconfigbackend.h
@ingroup dsettings
@class Dtk::Core::DSettingsDConfigBackend dsettingsdconfigbackend.h
@brief 配置存储到DConfig
@fn Dtk::Core::DSettingsDConfigBackend::DSettingsDConfigBackend(const QString &name, const QString &subpath = QString(), QObject *parent = nullptr)
@brief DSettingsDConfigBackend构造函数,使用DConfig为配置文件名,保存数据到配置文件。
@param[in] name 配置文件名
@param[in] subpath 配置文件名的子目录
@param[in] parent 父对象
@fn virtual QStringList Dtk::Core::DSettingsDConfigBackend::keys() const
@brief 返回Dconfig的全部键值
@return
@fn virtual QVariant Dtk::Core::DSettingsDConfigBackend::getOption(const QString &key) const
@brief 从DConfig获取键值
@param[in] key
@return
@fn virtual void QVariant Dtk::Core::DSettingsDConfigBackend::doSetOption(const QString &key, const QVariant &value)
@brief 给DConfig设置键值
@param[in] key
@param[in] value
@fn virtual void Dtk::Core::DSettingsDConfigBackend::doSync()
@brief 触发DSettings将选项值保存到DConfig
*/

View File

@ -0,0 +1,27 @@
/*!
@~chinese
@file include/settings/backend/gsettingsbackend.h
@ingroup dsettings
@class Dtk::Core::GSettingsBackend gsettingsbackend.h
@brief DSettings的存储后端使用gsettings
@details 你可以从libdtkcore-bin中找到此工具, 使用/usr/lib/x86_64-linux-gnu/libdtk-<VERSION(版本号)>/DCore/bin/dtk-settings -h 获取帮助
@fn Dtk::Core::GSettingsBackend::GSettingsBackend(DSettings *settings, QObject *parent = nullptr)
@brief GSettingsBackend构造函数
@fn virtual QStringList Dtk::Core::GSettingsBackend::keys() const
@brief gsettings的全部键值
@return 返回gsettings的全部键值
@fn virtual QVariant Dtk::Core::GSettingsBackend::getOption(const QString &key) const
@brief 根据`key`获取值
@return 返回键对应的值
@fn virtual void Dtk::Core::GSettingsBackend::doSetOption(const QString &key, const QVariant &value)
@brief 设置`key`对应的值
@fn virtual void Dtk::Core::GSettingsBackend::doSync()
@brief 触发DSettings将选项同步到存储
*/

View File

@ -0,0 +1,31 @@
/*!
@~chinese
@file include/settings/backend/qsettingbackend.h
@ingroup dsettings
@class Dtk::Core::QSettingBackend qsettingbackend.h
@brief 存储DSettings到QSettings
@fn Dtk::Core::QSettingBackend::QSettingBackend(const QString &filepath, QObject *parent = 0)
@brief QSettingBackend构造函数,使用QSettings::NativeFormat将数据保存到指定路径。
@param[in] filepath 存储数据的路径
@param[in] parent 父对象
@fn virtual QStringList Dtk::Core::QSettingBackend::keys() const
@brief QSettings的全部键值
@return 返回QSettings的全部键值
@fn virtual QVariant Dtk::Core::QSettingBackend::getOption(const QString &key) const
@brief 根据`key`获取值
@param[in] key 配置项名称
@return 返回键对应的值
@fn virtual void Dtk::Core::QSettingBackend::doSetOption(const QString &key, const QVariant &value)
@brief 设置`key`对应的值
@param[in] key 配置项名称
@param[in] value 需要设置的值
@fn virtual void Dtk::Core::QSettingBackend::doSync()
@brief 触发DSettings选项值保存到QSettings
*/

View File

@ -0,0 +1,230 @@
/*!
@~chinese
@file include/settings/dsettings.h
@ingroup dsettings
@class Dtk::Core::DSettingsBackend dsettings.h
@brief DSettingsBackend是一个配置存储类的接口
@details 简单的例子:
@code
{
"groups": [{
"key": "base",
"name": "Basic settings",
"groups": [{
"key": "open_action",
"name": "Open Action",
"options": [{
"key": "alway_open_on_new",
"type": "checkbox",
"text": "Always Open On New Windows",
"default": true
},
{
"key": "open_file_action",
"name": "Open File:",
"type": "combobox",
"default": ""
}
]
},
{
"key": "new_tab_windows",
"name": "New Tab & Window",
"options": [{
"key": "new_window_path",
"name": "New Window Open:",
"type": "combobox",
"default": ""
},
{
"key": "new_tab_path",
"name": "New Tab Open:",
"type": "combobox",
"default": ""
}
]
}
]
}]
}
@endcode
读取/设置其值的示例如下:
@code
// 初始化一个存储后端
QTemporaryFile tmpFile;
tmpFile.open();
auto backend = new Dtk::Core::QSettingBackend(tmpFile.fileName());
// 从json中初始化配置
auto settings = Dtk::Core::DSettings::fromJsonFile(":/resources/data/dfm-settings.json");
settings->setBackend(backend);
// 读取配置
auto opt = settings->option("base.new_tab_windows.new_window_path");
qDebug() << opt->value();
// 修改配置
opt->setValue("Test")
qDebug() << opt->value();
@endcode
@sa Dtk::Core::DSettingsOption
@sa Dtk::Core::DSettingsGroup
@sa Dtk::Core::DSettingsBackend
@sa Dtk::Widget::DSettingsWidgetFactory
@sa Dtk::Widget::DSettingsDialog
@fn Dtk::Core::DSettingsBackend::DSettingsBackend(QObject *parent = Q_NULLPTR)
@brief DSettingsBackend构造函数
@fn virtual QStringList DSettingsBackend::keys() const = 0;
@brief 返回全部键值
@fn virtual QVariant DSettingsBackend::getOption(const QString &key) const = 0;
@brief 获取 `key` 对应的值
@fn virtual void DSettingsBackend::doSync() = 0;
@brief 开始进行同步
@fn virtual void DSettingsBackend::doSetOption(const QString &key, const QVariant &value) = 0;
@brief 设置`key`对应的值,并使用存储后端进行存储。
@fn void DSettingsBackend::optionChanged(const QString &key, const QVariant &value);
@brief DSettingsOption的值发生变化时发出的信号。
@details `key` 发生改变的 option 键,`value`对应键的值。
@fn void DSettingsBackend::sync();
@brief 私有信号,请勿使用。
@fn void DSettingsBackend::setOption(const QString &key, const QVariant &value);
@brief 私有信号,请勿使用。
@class Dtk::Core::DSettings dsettings.h
@brief DSettings是设计上为Dtk的应用程序提供统一的配置存储以及界面生成工具的基础库。
@details DSetting使用json作为应用配置程序的描述文件。简单来说,应用查询的配置分为组/键值二个基础层级,
对于一个标准的Dtk配置控件,一般只包含组/子组/键值三个层级,对于超过三个层级的键值,可以通过
DSettings的API接口进行读取和写入,但是不能在标准的DSettingsDialogs上显示出来。
一个简单的配置文件如下:
@code
{
"groups": [{
"key": "base",
"name": "Basic settings",
"groups": [{
"key": "open_action",
"name": "Open Action",
"options": [{
"key": "alway_open_on_new",
"type": "checkbox",
"text": "Always Open On New Windows",
"default": true
},
{
"key": "open_file_action",
"name": "Open File:",
"type": "combobox",
"default": ""
}
]
},
{
"key": "new_tab_windows",
"name": "New Tab & Window",
"options": [{
"key": "new_window_path",
"name": "New Window Open:",
"type": "combobox",
"default": ""
},
{
"key": "new_tab_path",
"name": "New Tab Open:",
"type": "combobox",
"default": ""
}
]
}
]
}]
}
@endcode
该组中包含一个base的root组,两个子组: open_action/new_tab_windows,每个子组有包含若干选项。
对于"New Window Open:"这个配置,其完整的访问id为base.new_tab_windows.new_window_path。
读取/设置其值的示例如下:
@code
// 初始化一个存储后端
QTemporaryFile tmpFile;
tmpFile.open();
auto backend = new Dtk::Core::QSettingBackend(tmpFile.fileName());
// 从json中初始化配置
auto settings = Dtk::Core::DSettings::fromJsonFile(":/resources/data/dfm-settings.json");
settings->setBackend(backend);
// 读取配置
auto opt = settings->option("base.new_tab_windows.new_window_path");
qDebug() << opt->value();
// 修改配置
opt->setValue("Test")
qDebug() << opt->value();
@endcode
@sa Dtk::Core::DSettingsOption
@sa Dtk::Core::DSettingsGroup
@sa Dtk::Core::DSettingsBackend
@sa Dtk::Widget::DSettingsWidgetFactory
@sa Dtk::Widget::DSettingsDialog
@fn Dtk::Core::DSettings::DSettings(QObject *parent = Q_NULLPTR)
@brief DSettings构造函数
@fn void Dtk::Core::DSettings::setBackend(DSettingsBackend *backend = nullptr)
@brief 设置存储后端
@fn static QPointer<DSettings> Dtk::Core::DSettings::fromJson(const QByteArray &json)
@brief 从 json 中获取 DSettings,返回的数据使用之后需要自己手动释放。
@fn static QPointer<DSettings> Dtk::Core::DSettings::fromJsonFile(const QString &filepath)
@brief 从 json 文件中获取 DSetting。
@fn QJsonObject Dtk::Core::DSettings::meta() const
@brief 返回JSON对象
@fn QStringList Dtk::Core::DSettings::keys() const
@brief 返回全部键值
@fn QList<QPointer<DSettingsOption> > Dtk::Core::DSettings::options() const
@brief 返回全部 `key` 的值
@fn QPointer<DSettingsOption> Dtk::Core::DSettings::option(const QString &key) const
@brief 获取 `key` 对应的值
@fn QVariant Dtk::Core::DSettings::value(const QString &key) const
@brief 获取 `key` 对应的值
@fn QStringList Dtk::Core::DSettings::groupKeys() const
@brief 返回子组全部键值
@fn QList<QPointer<DSettingsGroup> > Dtk::Core::DSettings::groups() const
@brief 返回子组全部 `key` 的值
@fn QPointer<DSettingsGroup> Dtk::Core::DSettings::group(const QString &key) const
@brief DSettings::group将递归找到子组
@return
@fn QVariant Dtk::Core::DSettings::getOption(const QString &key) const
@brief 获取 `key` 对应的值
@fn void Dtk::Core::DSettings::sync()
@brief 开始进行同步
@fn void Dtk::Core::DSettings::setOption(const QString &key, const QVariant &value)
@brief 设置键值
@fn void Dtk::Core::DSettings::reset()
@brief 重置键值
*/

View File

@ -0,0 +1,60 @@
/*!
@~chinese
@file include/settings/dsettingsgroup.h
@ingroup dsettings
@class Dtk::Core::DSettingsGroup dsettingsgroup.h
@brief 一组DSettings选项的集合,也可以包含子组。
@fn Dtk::Core::DSettingsGroup::DSettingsGroup(QObject *parent = Q_NULLPTR)
@brief DSettingsGroup构造函数
@fn QPointer<DSettingsGroup> Dtk::Core::DSettingsGroup::parentGroup() const
@brief 获取当前组的父组
@return
@fn void Dtk::Core::DSettingsGroup::setParentGroup(QPointer< DSettingsGroup > parentGroup)
@brief 设置当前组的父组为 `parentGroup`
@fn QString Dtk::Core::DSettingsGroup::key() const
@brief 返回这个组的键,会包含全部的父组的键
@return 返回这个组的键,会包含全部的父组的键
@fn QString Dtk::Core::DSettingsGroup::name() const
@brief 返回这个组名称,它可能被翻译。
@return 返回这个组名称
@fn bool Dtk::Core::DSettingsGroup::isHidden() const
@brief 检查这个选项组是否会在界面上显示
@return true 表示则这个选项组会显示出来
@fn QPointer<DSettingsGroup> Dtk::Core::DSettingsGroup::childGroup(const QString &groupKey) const
@brief 返回给定键在选项组中对应的子组。`groupKey`子组的键
@return 返回子组的指针
@fn QPointer<DSettingsOption> Dtk::Core::DSettingsGroup::option(const QString &key) const
@brief 根据键值获取选项。`key`选项的完整键
@return 返回对应键值选项指针
@fn QList<QPointer<DSettingsGroup> > Dtk::Core::DSettingsGroup::childGroups() const
@brief 列出组下面所有的直接子组。
@return 返回所有子组指针列表
@fn QList<QPointer<DSettingsOption> > Dtk::Core::DSettingsGroup::childOptions() const
@brief 列出组下面所有的直接选项。
@return 返回所有子选项指针列表
@fn QList<QPointer<DSettingsOption> > Dtk::Core::DSettingsGroup::options() const
@brief 列出组下面所有的选项。
@return 返回所有选项指针列表
@fn QPointer<DSettingsGroup> Dtk::Core::DSettingsGroup::fromJson(const QString &prefixKey, const QJsonObject &group)
@brief 将json对象转化为DSettingsGroup。`prefixKey` 组键值前缀 `group` 待反序列化的json对象
@return 返回解析json后的组指针
@sa QPointer Dtk::Core::DSettingsOption
@fn void Dtk::Core::DSettingsGroup::parseJson(const QString &prefixKey, const QJsonObject &group)
@brief 将json对象转化为DSettingsGroup。`prefixKey` 组键值前缀 `group` 待反序列化的json对象
@sa QPointer<DSettingsOption> Dtk::Core::DSettingsGroup::fromJson(const QString &prefixKey, const QJsonObject &json)
*/

View File

@ -0,0 +1,87 @@
/*!
@~chinese
@file include/settings/dsettingsoption.h
@ingroup dsettings
@class Dtk::Core::DSettingsOption dsettingsoption.h
@brief DSettingsOption是DSettings的基本单元,用于存放一对键-值数据。
@fn Dtk::Core::DSettingsOption::DSettingsOption(QObject *parent = Q_NULLPTR)
@brief DSettingsOption构造函数
@fn QPointer<DSettingsGroup> Dtk::Core::DSettingsOption::parentGroup() const
@brief 当前选项的直接上级组
@return 返回当前选项的直接上级组
@fn void Dtk::Core::DSettingsOption::setParentGroup(QPointer<DSettingsGroup> parentGroup)
@brief 修改当前选项的上级组
@param[in] parentGroup 上级组
@fn QString Dtk::Core::DSettingsOption::key() const
@brief 当前选项的键值
@return 返回当前选项的键值
@fn QString Dtk::Core::DSettingsOption::name() const
@brief 当前选项的名称
@return 返回当前选项的名称
@fn bool Dtk::Core::DSettingsOption::canReset() const
@brief 选项是否可以重置,如果可以重置,在调用reset方法后,选项的值会变成初始值。
@return 如果可以重置则为true
@fn QVariant Dtk::Core::DSettingsOption::defaultValue() const
@brief 选项的默认值
@return 返回选项的默认值
@fn QVariant Dtk::Core::DSettingsOption::value() const
@brief 选项的当前值
@return 返回选项的当前值
@fn QVariant Dtk::Core::DSettingsOption::data(const QString &dataType) const
@param[in] dataType 数据类型
@brief 选项的附件data,用于未选项设置一些额外的辅助属性。
@return 数据类型对应的数据.
@sa QObject::property
@sa Dtk::Core::DSettingsOption::setData
@fn QString Dtk::Core::DSettingsOption::viewType() const
@brief 选项的控件类型
@return 返回选项的控件类型
@sa Dtk::Widget::DSettingsWidgetFactory
@fn bool Dtk::Core::DSettingsOption::isHidden() const
@brief 检查选项是否会在界面上显示
@return 如果显示则返回true,否则返回false。
@fn static QPointer<DSettingsOption> Dtk::Core::DSettingsOption::fromJson(const QString &prefixKey, const QJsonObject &json)
@brief 从json对象中反序列化出一个选项对象
@param[in] prefixKey 选项的前缀
@param[in] json 待反序列化的json对象
@return 返回解析完成后的 `option` 数据
@fn void Dtk::Core::DSettingsOption::setValue(QVariant value)
@brief 设置选项的当前值.
@param[in] value 选项的当前值
@fn void Dtk::Core::DSettingsOption::setData(const QString &dataType, QVariant value)
@brief 为选项添加自定义属性
@param[in] dataType 选项的扎属性数据id,对每个选项必须唯一
@param[in] value 选项id对应的值
@sa Dtk::Core::DSettingsOption::data
@fn void Dtk::Core::DSettingsOption::parseJson(const QString &prefixKey, const QJsonObject &option)
@brief 从json对象中反序列化,并设置自身的值。
@param[in] prefixKey 选项的前缀
@param[in] option 待反序列化的json对象
@sa QPointer<DSettingsOption> Dtk::Core::DSettingsOption::fromJson(const QString &prefixKey, const QJsonObject &json)
@fn void Dtk::Core::DSettingsOption::valueChanged(QVariant value)
@brief 选项的数据变化时发出改信息
@param[in] value 发生改变的数据
@fn void Dtk::Core::DSettingsOption::dataChanged(const QString &dataType, QVariant value);
@brief 选项的附件的额外数据变化时发出改信息,可以看作这个值的属性发生变化。
@param[in] dataType 改变的数据类型
@param[in] value 发生改变的数据
*/

View File

@ -0,0 +1,166 @@
@page dsettings dsettings--dtk设置工具组件
# DSettings
## DSettingsdtk设置组件
[dsettings.h 详细文档](dsettings_8h.html)
项目目录结构如下:
```bash
├── CMakeLists.txt
├── data
│ └── settings.json
├── data.qrc
└── main.cpp
```
CMakeLists.txt:
```cmake
cmake_minimum_required(VERSION 3.1.0) # 指定cmake最低版本
project(dsetting-example VERSION 1.0.0 LANGUAGES CXX)# 指定项目名称, 版本, 语言 cxx就是c++
set(CMAKE_CXX_STANDARD 11) # 指定c++标准
set(CMAKE_CXX_STANDARD_REQUIRED ON) # 指定c++标准要求,至少为11以上
set(CMAKE_AUTORCC ON) # support qt resource file # 支持qt资源文件
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # 支持 clangd
if (CMAKE_VERSION VERSION_LESS "3.7.0") # 如果cmake版本小于3.7.0
set(CMAKE_INCLUDE_CURRENT_DIR ON) # 设置包含当前目录
endif()
find_package(DtkCore REQUIRED) # 寻找Dtk组件Core
add_executable(${PROJECT_NAME} # 生成可执行文件
main.cpp
data.qrc
)
target_link_libraries(${PROJECT_NAME} PRIVATE # 添加需要链接的共享库
Dtk::Core
)
```
settings.json:
```json
{
"groups": [{
"key": "base",
"name": "Basic settings",
"groups": [{
"key": "open_action",
"name": "Open Action",
"options": [{
"key": "alway_open_on_new",
"type": "checkbox",
"text": "Always Open On New Windows",
"default": true
},
{
"key": "open_file_action",
"name": "Open File:",
"type": "combobox",
"default": ""
}
]
},
{
"key": "new_tab_windows",
"name": "New Tab & Window",
"options": [{
"key": "new_window_path",
"name": "New Window Open:",
"type": "combobox",
"default": ""
},
{
"key": "new_tab_path",
"name": "New Tab Open:",
"type": "combobox",
"default": ""
}
]
}
]
}]
}
```
data.qrc
```xml
<RCC>
<qresource prefix="/">
<file>data/settings.json</file>
</qresource>
</RCC>
```
main.cpp
```cpp
#include <QCoreApplication>
#include <DSettings>
#include <qsettingbackend.h>
#include <DSettingsGroup>
#include <DSettingsOption>
#include <QTemporaryFile>
#include <QDebug>
DCORE_USE_NAMESPACE
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
// 初始化一个存储后端
QTemporaryFile tmpFile;
tmpFile.open();
QPointer<QSettingBackend> backend = new QSettingBackend(tmpFile.fileName());
// 从json中初始化配置
QPointer<DSettings> settings = DSettings::fromJsonFile(":/data/settings.json");
settings->setBackend(backend);
// 读取配置
// 该组中包含一个base的root组,两个子组: open_action/new_tab_windows,每个子组有包含若干选项。
// 对于"New Window Open:"这个配置,其完整的访问id为base.new_tab_windows.new_window_path。
QPointer<DSettingsOption> opt = settings->option("base.new_tab_windows.new_window_path");
qDebug() << opt->value();
// 修改配置
opt->setValue("Test");
qDebug() << opt->value();
// 获取所有keys
QStringList keys = settings->keys();
qDebug() << keys;
// base.open_action对应的组
QPointer<DSettingsGroup> group = settings->group("base.open_action");
qDebug() << group->key();
return a.exec();
}
```
编译运行:
```bash
cmake -Bbuild
cmake --build build
./build/dsetting-example
```
运行结果如下图:
![img](/docs/src/dsettings.png)
@defgroup dsettings
@brief dtk设置组件

BIN
docs/src/dciicon-tree.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

BIN
docs/src/dsettings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

BIN
docs/src/layout.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,70 @@
/*!
@~chinese
@file include/util/dabstractunitformatter.h
dabstractunitformatter.h文件提供了DAbstractUnitFormatter类, DAbstractUnitFormatter是抽象的单位格式化工具, 提供统一的单位格式化接口
@class Dtk::Core::DAbstractUnitFormatter include/util/dabstractunitformatter.h
@brief 抽象格式化工具基类
@details
DAbstractUnitFormatter提供统一的单位格式化接口. 在DAbstractUnitFormatter的设计理念中, 不同大小的单位被编号成不同级别的单位id. <br>
id从小到大, 单位从低级到高级. 各相邻单位之间的进率可以是不均匀的, 实现者只需实现unitConvertRate, 返回当前单位到下一高级单位(从id为x的单位到id为x+1的单位)的进率是正确的. <br>
事实上, 实现者如果保证unitConvertRate对于任一id为x的单位, 其到id为x+1的单位的换算比率(允许小于1)是正确的, 不需满足id递增, 单位级别递增的约束(即unitConvertRate总是大于1的约束) <br>
注意, 实现者此时需重写其他接口以同时保证正确性.
@fn DAbstractUnitFormatter::DAbstractUnitFormatter()
@brief 空参构造函数
@note 注意, 该类为抽象类, 不可直接实例化, 该构造函数仅供实现子类使用.
@fn @pure virtual int DAbstractUnitFormatter::unitMax() const = 0
@brief 获取最大的单位id
@return 最大的单位id
@fn @pure virtual int DAbstractUnitFormatter::unitMin() const = 0
@brief 获取最小的单位id
@return 最小的单位id
@fn @pure virtual uint DAbstractUnitFormatter::unitConvertRate(int unitId) const = 0
@brief 获取当前单位到下一高级单位的进率
@param[in] unitId 当前单位id
@return 进率, 正常情况下, 大于1
@note 下一高级单位指id为unitId + 1的单位.
@fn virtual qreal DAbstractUnitFormatter::unitValueMax(int unitId) const
@brief 获取当前单位的最大值
@param[in] unitId 当前单位id
@return 单位最大值
@fn virtual qreal DAbstractUnitFormatter::unitValueMin(int unitId) const
@brief 获取当前单位的最小值
@param[in] unitId 当前单位id
@return 单位最小值
@fn virtual QString DAbstractUnitFormatter::unitStr(int unitId) const = 0
@brief 获取当前单位的字符串表示
@param[in] unitId 当前单位id
@return 单位字符串表示
@fn qreal DAbstractUnitFormatter::formatAs(qreal value, int currentUnit, const int targetUnit) const
@brief 格式化数值到指定单位
@param[in] value 当前单位下表示的数值
@param[in] currentUnit 当前单位id
@param[in] targetUnit 目标单位id
@return 格式化后以目标单位表示的数值
@fn QPair<qreal, int> DAbstractUnitFormatter::format(const qreal value, const int unit) const
@brief 格式化数值到合适的单位
@param[in] value 当前单位下表示的数值
@param[in] unit 当前单位
@return 格式化后的合适的数值和单位
合适是指: 如果单位大于unitMin()或者小于unitMax(), 会尽量保证值被转换到接近最小值的合适单位上.
@fn QList<QPair<qreal, int> > DAbstractUnitFormatter::formatAsUnitList(const qreal value, int unit) const
@brief 包括完整转换数据版本的format()
@param[in] value 当前单位下表示的数值
@param[in] unit 当前单位
@return 格式化产生的所有的数值和单位
*/

View File

@ -0,0 +1,127 @@
/*!
@~chinese
@ingroup dutil
@file include/util/ddbusextendedabstractinterface.h
该文件提供了一个扩展DBus接口工具类
@class Dtk::Core::DDBusExtendedAbstractInterface
@brief 扩展DBus接口, 继承自QDBusAbstractInterface
@details 和QDBusAbstractInterface相比, 该类连接了org.freedesktop.DBus.Properties接口, 提供了异步访问属性的接口, 可以方便地通过此类进行异步DBus通信. <br>
同时此类提供了属性改变信号的分发和中继.
@fn DDBusExtendedAbstractInterface::DDBusExtendedAbstractInterface(const QString &service, const QString &path, const char *interface, const QDBusConnection &connection, QObject *parent)
@brief 构造函数
@param[in] service 该interface属于的服务
@param[in] path 该interface属于的对象路径
@param[in] interface 该interface实际连接的接口
@param[in] connection 用于连接该interface的DBus连接
@param[in] parent 父对象
@note 该构造函数受到保护, 只有子对象才能访问.
@property Dtk::Core::DDBusExtendedAbstractInterface::sync
@brief 是否同步获取属性
@details 当sync为false的时候, 在调用属性的get函数的时候会一直返回空值, 解决方法是监听属性的changed信号并自行保存一份缓存, 让changed信号修改这个缓存.
@property Dtk::Core::DDBusExtendedAbstractInterface::useCache
@brief 是否使用缓存
@details 如果使用缓存, 在内部获取属性的时候将不再进行DBus调用更新属性.
@fn inline bool DDBusExtendedAbstractInterface::sync() const
@brief 获取是否同步
@sa [sync](@ref Dtk::Core::DDBusExtendedAbstractInterface::sync)
@fn void DDBusExtendedAbstractInterface::setSync(bool sync, bool autoStart)
@brief 设置是否同步和自启动
@param[in] sync 是否同步
@param[in] autoStart 是否自启动
@sa [sync](@ref Dtk::Core::DDBusExtendedAbstractInterface::sync)
@fn void DDBusExtendedAbstractInterface::setSync(bool sync)
@brief 设置是否同步
@param[in] sync 是否是同步模式
@sa [sync](@ref Dtk::Core::DDBusExtendedAbstractInterface::sync)
@details 该函数内部实现调用[setSync](@ref DDBusExtendedAbstractInterface::setSync(bool sync, bool autoStart)), autoStart参数值为true, 即默认自启动.
@fn inline bool DDBusExtendedAbstractInterface::useCache() const
@brief 获取是否使用缓存
@sa [useCache](@ref Dtk::Core::DDBusExtendedAbstractInterface::useCache)
@fn inline void DDBusExtendedAbstractInterface::setUseCache()
@brief 设置是否使用缓存
@sa [useCache](@ref Dtk::Core::DDBusExtendedAbstractInterface::useCache)
@fn void DDBusExtendedAbstractInterface::getAllProperties()
@brief 获取所有属性
@sa [sync](@ref Dtk::Core::DDBusExtendedAbstractInterface::sync)
@details 该方法会调用org.freedesktop.DBus.Properties接口的GetAll方法, 获取所有属性并且发送属性改变信号, 如果是同步模式(sync为true), 该方法会使用同步调用call. <br>
sync为false的时候会使用异步调用asyncCall.
@fn inline QDBusError DDBusExtendedAbstractInterface::lastExtendedError() const
@brief 获取上一次的错误
@return QDBusError 上一次由DBus调用引起的错误
@fn void DDBusExtendedAbstractInterface::startServiceProcess()
@brief 启动服务进程
@details 该函数会调用org.freedesktop.DBus的服务的/路径的StartServiceByName方法启动DDBusExtendedAbstractInterface对应的Service.
@fn void DDBusExtendedAbstractInterface::serviceValidChanged(const bool valid) const
@brief 服务是否有效状态改变信号
@param[in] valid 服务是否有效
@fn void DDBusExtendedAbstractInterface::serviceStartFinished(const quint32 ret) const
@brief 服务启动完成通知信号
@param[in] ret 启动服务的返回值
@details 启动服务是调用org.freedesktop.DBus服务的/路径的StartServiceByName方法, ret为StartServiceByName的返回值.
@fn void DDBusExtendedAbstractInterface::propertyChanged(const QString &propertyName, const QVariant &value)
@brief 属性改变信号
@param[in] propertyName 改变的属性名
@param[in] value 改变后的属性值
@fn void DDBusExtendedAbstractInterface::propertyInvalidated(const QString &propertyName)
@brief 属性失效通知信号
@param[in] propertyName 失效的属性名
@details 该信号会在DBus属性改变但是本地反序列化失败的情况下发出.
@fn void DDBusExtendedAbstractInterface::asyncPropertyFinished(const QString &propertyName)
@brief 异步获取属性完成通知信号
@param[in] propertyName 获取成功的属性名
@fn void DDBusExtendedAbstractInterface::asyncSetPropertyFinished(const QString &propertyName)
@brief 异步设置属性完成通知信号
@param[in] propertyName 设置成功的属性名
@fn void DDBusExtendedAbstractInterface::asyncGetAllPropertiesFinished()
@brief 异步获取所有属性完成的通知信号
@sa [getAllProperties](@ref Dtk::Core::DDBusExtendedAbstractInterface::getAllProperties())
@details getAllProperties方法并没有返回值, 须监听此信号以实现完整功能.
@fn void DDBusExtendedAbstractInterface::connectNotify(const QMetaMethod &signal)
@brief 信号连接通知函数
@param[in] signal 连接到该对象的信号
@details 该函数重写了QObject的connectNotify函数, 当有某一个信号连接到该对象的时候, 该函数就会被调用.
@fn void DDBusExtendedAbstractInterface::disconnectNotify(const QMetaMethod &signal)
@brief 信号断开连接通知函数
@param[in] signal 断连的信号
@details 该函数重写了QObject的disconnectNotify函数, 当有某一个连接到该对象的信号断连时, 该函数就会被调用.
@fn QVariant DDBusExtendedAbstractInterface::internalPropGet(const char *propname, void *propertyPtr)
@brief 内部属性获取函数
@param[in] propname 属性名
@param[in] propertyPtr 属性缓存指针
@sa [useCache](@ref Dtk::Core::DDBusExtendedAbstractInterface::useCache)
@sa [sync](@ref Dtk::Core::DDBusExtendedAbstractInterface::sync)
@details 当useCache为true的时候, 该函数仅仅返回propertyPtr指向的内存拷贝.
@fn void DDBusExtendedAbstractInterface::internalPropSet(const char *propname, const QVariant &value, void *propertyPtr)
@brief 内部属性设置函数
@param[in] propname 属性名
@param[in] value 要设置的值
@param[in] propertyPtr 属性缓存指针
@sa [sync](@ref Dtk::Core::DDBusExtendedAbstractInterface::sync)
*/

View File

@ -0,0 +1,89 @@
/*!
@~chinese
@ingroup dutil
@file include/util/ddbussender.h
本文件包含了DDBusSender类和相对应的工具类
@class DDBusData
@brief DBus数据存储类
@details 该类用来存储DBus连接的相关信息
@var DDBusData::service
@brief 请求调用服务名
@var DDBusData::path
@brief 请求调用对象路径
@var DDBusData::interface
@brief 请求调用接口名
@var DDBusData::queryName
@brief 请求调用函数名
@var DDBusData::connection
@brief 进行调用的维护的DBus连接
@class DDBusCaller
@brief DBus接口调用工具类
@details 该类用于完成实际的DBus接口调用
@fn template <typename T> DDBusCaller DDBusCaller::arg(const T &argument)
@brief 添加调用参数
@details 改接口符合链式编程规则
@param[in] argument 调用参数
@return DDBusCaller 添加参数之后的caller
@fn QDBusPendingCall DDBusCaller::call()
@brief 发起实际调用
@return QDBusPendingCall 异步调用对象
@class DDBusProperty
@brief DBus属性操作对象
@details 该类的作用和DDBusCaller类似, 用于完成实际的调用, 其封装了org.freedesktop.DBus.Properties的接口, 提供方便快捷地属性访问方法set和get
@fn QDBusPendingCall DDBusProperty::get()
@brief 获取属性值
@return QDBusPendingCall 异步调用对象, 在完成之后可用于获取属性值
@fn template <typename T> QDBusPendingCall DDBusProperty::set(const T &value)
@brief 设置属性值
@param[in] value 需要设置的值
@return QDBusPendingCall 异步调用对象, 在完成之后可用于判断设置操作是否成功
@class DDBusSender
@brief DBus请求工具类
@details 通过该类的方法可以方便地调用某个服务的某个方法. 该类的设计采用链式编程, 多个api都会返回操作之后的对象, 这使得原本需要使用QDBusMessage多行代码完成的调用只需要一行代码即可完成.
@fn DDBusSender DDBusSender::service(const QString &service)
@brief 设置请求服务名
@param[in] service 请求服务名
@return DDBusSender 设置之后的sender
@fn DDBusSender DDBusSender::interface(const QString &interface)
@brief 设置请求接口名
@param[in] interface 请求接口名
@return DDBusSender 设置之后的sender
@fn DDBusSender DDBusSender::path(const QString &path)
@brief 设置请求对象路径
@param[in] path 请求对象路径
@return DDBusSender 设置之后的sender
@fn DDBusCaller DDBusSender::method(const QString &method)
@brief 设置请求方法名并获取请求调用对象
@details 确保在调用该方法之前, service, path和interface都已经被正确设置
@param[in] method 请求方法名
@return DDBusCaller 方法调用工具对象, 调用该对象的call函数即可完成最终调用
@fn DDBusProperty DDBusSender::property(const QString &property)
@brief 设置访问的属性名并获得属性操作对象
@details 确保在调用该方法之前, service, path和interface都已经被正确设置
@param[in] property 访问属性名
@return DDBusProperty 属性操作对象
@fn static DDBusSender DDBusSender::system()
@brief 获取 systembus 访问的能力
@details DDBusSender 默认使用 sessionbus ,此接口提供 systembus 的访问能力
@return DDBusSender 可以访问 systembus 的 sender 对象
*/

View File

@ -0,0 +1,46 @@
/*!
@~chinese
@ingroup dutil
@file include/util/ddisksizeformatter.h
本文件定义了用于转换磁盘大小单位的类DDiskSizeFormatter
@class Dtk::Core::DDiskSizeFormatter
@brief 磁盘大小单位转换类
@details 继承自DAbstractUnitFormatter, 支持最小的单位为字节, 最大的单位为T字节, 支持修改相邻单位之间的进率, 是采用1000还是1024. 默认使用1000作为进率
@enum Dtk::Core::DDiskSizeFormatter::DiskUnits
@brief 磁盘大小单位枚举
@var Dtk::Core::DDiskSizeFormatter::DiskUnits Dtk::Core::DDiskSizeFormatter::B
@brief 字节
@var Dtk::Core::DDiskSizeFormatter::DiskUnits Dtk::Core::DDiskSizeFormatter::K
@brief 千字节
@var Dtk::Core::DDiskSizeFormatter::DiskUnits Dtk::Core::DDiskSizeFormatter::M
@brief 兆字节
@var Dtk::Core::DDiskSizeFormatter::DiskUnits Dtk::Core::DDiskSizeFormatter::G
@brief 吉字节
@var Dtk::Core::DDiskSizeFormatter::DiskUnits Dtk::Core::DDiskSizeFormatter::T
@brief 太字节|
@fn QString DDiskSizeFormatter::unitStr(int unitId) const override
@brief 获取unitId对应单位的字符串表示
@param[in] unitId 单位id
@return QString 字符串表示
@fn DDiskSizeFormatter DDiskSizeFormatter::rate(int rate)
@brief 设置当前的单位进率
@param[in] rate 需要设置的进率
@return DDiskSizeFormatter 设置之后的formatter
@fn int DDiskSizeFormatter::unitMin() const override
@brief 获取最小的单位枚举
@return int 最小的单位
@fn int DDiskSizeFormatter::unitMax() const override
@brief 获取最大的单位枚举
@return int 最大的单位
@fn uint DDiskSizeFormatter::unitConvertRate(int unitId) const override
@brief 获取unitId对应单位到下一个单位的进率
@param[in] unitId 当前单位id
*/

View File

@ -0,0 +1,72 @@
/*!
@~chinese
@ingroup dutil
@file include/util/dtextencoding.h
@details 本文件包含文本编码识别和文本编码转换的公共接口。
@class Dtk::Core::DTextEncoding
@brief 文本编码信息类,提供文本编码识别和文本编码转换的公共接口。
@details 提供文本编码识别和文本编码转换的公共接口,默认使用 QTextCodec 进行检测,
若系统环境中存在 libuchardet.so 及 libicuuc.so 库,可拓展支持的编码格式。
@fn QByteArray Dtk::Core::DTextEncoding::detectTextEncoding(const QByteArray &content)
@brief 检测给定文本的编码格式。
@details 默认使用 QTextCodec 检测,若系统环境中存在 libuchardet.so 及 libicuuc.so 库,可拓展支持的编码格式。
检测会判断最接近的编码格式,未成功识别或为 ASCII 编码格式,将返回 UTF-8 编码格式。
@param[in] content 待检测的文本内容
@return 文本编码格式
@fn QByteArray Dtk::Core::DTextEncoding::detectFileEncoding(const QString &fileName, bool *isOk)
@brief 检测给定文件的文本编码格式,将读取文件头部最多 64KB 的文本用于检测。若文件访问失败,返回空编码格式。
@param[in] fileName 文件路径
@param[out] isOk 检测是否成功,主要判断文件内容能否正确读取
@return 文本编码格式
@sa DTextEncoding::detectTextEncoding
@fn bool Dtk::Core::DTextEncoding::convertTextEncoding(QByteArray &content, QByteArray &outContent, const QByteArray &toEncoding, const QByteArray &fromEncoding, QString *errString)
@brief 将输入的文本 `content` 从 `fromEncoding` 编码格式转换到 `toEncoding` 编码格式,转换后的文本保存到 `outContent` 。
若转换过程中出现错误,将返回 false , 并设置 `errString` 错误信息,已转换的文本仍会写入 `outContent` 。
@note 当处理大量文本数据时,需考虑并行处理,防止阻塞线程。
@param[in] content 传入的文本
@param[out] outContent 编码转换后的文本
@param[in] toEncoding 转换的编码格式
@param[in] fromEncoding 原始的编码格式,默认为空,会通过 `DTextEncoding::detectTextEncoding` 检测编码格式
@param[out] errString 错误信息
@return 是否转换成功
@sa DTextEncoding::convertTextEncodingEx
@fn bool Dtk::Core::DTextEncoding::convertTextEncodingEx(QByteArray &content, QByteArray &outContent, const QByteArray &toEncoding, const QByteArray &fromEncoding, QString *errString, int *convertedBytes)
@brief 将输入的文本 `content` 从 `fromEncoding` 编码格式转换到 `toEncoding` 编码格式,转换后的文本保存到 `outContent` 。
若转换过程中出现错误,将返回 false , 并设置 `errString` 错误信息,已转换的文本仍会写入 `outContent` 。
@note 当处理大量文本数据时,需考虑并行处理,防止阻塞线程。
@note 返回 false 时,已转换的文本仍会写入 `outContent` ,同时 `convertedBytes` 会记录已转换数据长度,你可以决定保留或移除转换文本。
@param[in] content 传入的文本
@param[out] outContent 编码转换后的文本
@param[in] toEncoding 转换的编码格式
@param[in] fromEncoding 原始的编码格式,默认为空,会通过 `DTextEncoding::detectTextEncoding` 检测编码格式
@param[out] errString 错误信息
@param[out] convertedBytes 已转换的 `content` 数据长度,若转换过程出现错误,这个值会指向异常字符出现的位置
@return 是否转换成功
@fn bool DTextEncoding::convertFileEncoding(const QString &fileName, const QByteArray &toEncoding, const QByteArray &fromEncoding, QString *errString)
@brief 读取输入的 `fileName` 文件内容,将文件内容从 `fromEncoding` 编码格式转换到 `toEncoding` 编码格式,转换后的文本保存到 `fileName` 。
若转换过程中出现错误,将返回 false , 并设置 `errString` 错误信息,已转换的文本会被抛弃。
@param[in] fileName 传入及保存的文件路径
@param[in] toEncoding 转换的编码格式
@param[in] fromEncoding 原始的编码格式,为空时会通过 `DTextEncoding::detectTextEncoding` 检测编码格式
@param[out] errString 错误信息
@return 是否转换成功
@sa DTextEncoding::convertTextEncoding
@fn bool DTextEncoding::convertFileEncodingTo(const QString &fromFile, const QString &toFile, const QByteArray &toEncoding, const QByteArray &fromEncoding, QString *errString)
@brief 读取输入的 `fromFile` 文件内容,将文件内容从 `fromEncoding` 编码格式转换到 `toEncoding` 编码格式,转换后的文本保存到 `toFile` 。
若转换过程中出现错误,将返回 false , 并设置 `errString` 错误信息,已转换的文本会被抛弃。
@param[in] fromFile 传入的文件路径
@param[in] toFile 保存的文件路径
@param[in] toEncoding 转换的编码格式
@param[in] fromEncoding 原始的编码格式,为空时会通过 `DTextEncoding::detectTextEncoding` 检测编码格式
@param[out] errString 错误信息
@return 是否转换成功
@sa DTextEncoding::convertTextEncoding
*/

View File

@ -0,0 +1,55 @@
/*!
@~chinese
@ingroup dutil
@file include/util/dthreadutils.h
本文件定义了线程相关的帮助类
@class DThreadUtils
@brief 线程帮助类
@details 本类主要用来进行异步线程调用, 此外本类所有的public接口都是线程安全的
@fn static DThreadUtils& DThreadUtils::gui()
@brief 获取以GUI线程初始化的静态对象
@return DThreadUtils& 静态对象的引用
@fn QThread* DThreadUtils::thread() const noexcept
@brief 获取DThreadUtils对应的线程
@return QThread* 对应线程的QThread对象的指针
@fn template <typename Func, typename... Args> inline auto run(QObject *context,typename QtPrivate::FunctionPointer<Func>::Object *obj, Func fun, Args &&...args)
@brief 在对应的线程执行传入的成员函数, 非阻塞
@param[in] context 对象上下文, 用来在执行调用时判断对象是否存在
@param[in] obj 对象指针
@param[in] fun 成员函数指针
@param[in] args 对应函数的参数
@return 以成员函数返回值类型实例化的QFuture对象
@fn template <typename Func, typename... Args> inline auto run(typename QtPrivate::FunctionPointer<Func>::Object *obj, Func fun, Args &&...args)
@brief 在对应的线程执行传入的成员函数, 非阻塞
@param[in] obj 对象指针
@param[in] fun 成员函数指针
@param[in] args 对应函数的参数
@return 以成员函数返回值类型实例化的QFuture对象
@fn template <typename Func, typename... Args> inline QFuture<std::invoke_result_t<std::decay_t<Func>, Args...>> run(QObject *context, Func fun, Args &&...args)
@brief 在对应的线程执行传入的成员函数, 非阻塞
@param[in] context 对象上下文, 用来在执行调用时判断对象是否存在
@param[in] fun 成员函数指针
@param[in] args 对应函数的参数
@return 以成员函数返回值类型实例化的QFuture对象
@fn template <typename Func, typename... Args> inline QFuture<std::invoke_result_t<std::decay_t<Func>, Args...>> run(Func fun, Args &&...args)
@brief 在对应的线程执行传入的成员函数, 非阻塞
@param[in] fun 可调用对象
@param[in] args 调用对应的参数
@return 以函数返回值类型实例化的QFuture对象
@fn template <typename... T> inline decltype(auto) exec(T &&...args)
@brief 在对应的线程执行传入的成员函数, 阻塞
@details 本函数是run函数的包装
@note 调用此函数的一方需要确保对应线程有事件循环, 否则会无限等待
@param[in] args 参数包, 具体含义参考run函数
@return 传入函数的返回值
*/

View File

@ -0,0 +1,40 @@
/*!
@~chinese
@ingroup dutil
@file include/util/dtimeunitformatter.h
该文件定义了用于转换时间单位的工具类DTimeUnitFormatter.
@class Dtk::Core::DTimeUnitFormatter
@brief 转换时间单位的工具类
@details 继承自DAbstractUnitFormatter, 支持最小单位为秒, 最大单位为天.
@enum Dtk::Core::DTimeUnitFormatter::TimeUnits
@brief 时间单位枚举
@var Dtk::Core::DTimeUnitFormatter::TimeUnits Dtk::Core::DTimeUnitFormatter::Seconds
@brief 秒
@var Dtk::Core::DTimeUnitFormatter::TimeUnits Dtk::Core::DTimeUnitFormatter::Minute
@brief 分钟
@var Dtk::Core::DTimeUnitFormatter::TimeUnits Dtk::Core::DTimeUnitFormatter::Hour
@brief 小时
@var Dtk::Core::DTimeUnitFormatter::TimeUnits Dtk::Core::DTimeUnitFormatter::Day
@brief 天
@fn QString DTimeUnitFormatter::unitStr(int unitId) const override
@brief 获取unitId对应单位的字符串表示
@param[in] unitId 单位id
@return QString 字符串表示
@fn int DTimeUnitFormatter::unitMin() const override
@brief 获取最小的单位枚举
@return int 最小的单位
@fn int DTimeUnitFormatter::unitMax() const override
@brief 获取最大的单位枚举
@return int 最大的单位
@fn uint DTimeUnitFormatter::unitConvertRate(int unitId) const override
@brief 获取unitId对应单位到下一个单位的进率
@param[in] unitId 当前单位id
*/

31
docs/util/dutil.zh_CN.dox Normal file
View File

@ -0,0 +1,31 @@
/*!
@chinese
@ingroup dutil
@file include/util/dutil.h
该文件定义和实现了一些小的工具函数.
@fn QString DUtil::escapeToObjectPath(const QString &str)
@brief 将字符串转义成符合DBus ObjectPath规则字符串
@param[in] str 需要转义的字符串
@return 转义后字符串
@attention 不要传入完整的dbus路径, 否则'/'也会被转义
@fn QString DUtil::unescapeFromObjectPath(const QString &str)
@brief 将DBus ObjectPath的部分路径转义成原来的字符串
@param[in] str 需要转义的字符串
@return 转义后字符串
@fn QString DUtil::getAppIdFromAbsolutePath(const QString &path)
@brief 从desktop文件的绝对路径中提取出AppId
@param[in] path 文件路径
@return 代表AppId的字符串
@attention AppId可能为空, 代表无法获取AppId
@fn QStringList DUtil::getAbsolutePathFromAppId(const QString &appId)
@brief 从appId中获取符合条件的Desktop文件路径
@param[in] appId app的Id
@return desktop文件的路径
@attention 可能有多个desktop文件的appId相同, 所以返回所有符合条件的列表
*/

13
docs/util/index.zh_CN.md Normal file
View File

@ -0,0 +1,13 @@
@page util util--DTK工具组件
# DTK util
## 模块介绍
该模块提供一些实用工具用于开发,包括:
+ 同种数据类的单位转换接口
+ DBus接口工具类
@defgroup dutil
@brief dtk实用工具

156
dtkcore.cmake Normal file
View File

@ -0,0 +1,156 @@
set(LIB_NAME dtk${DTK_VERSION_MAJOR}core)
set(DtkCore Dtk${DTK_VERSION_MAJOR}Core)
macro(add_sub_dir dir)
# message("add_subdirectory(${dir} ${OUTPUT_DIR}/${dir})")
add_subdirectory(${dir} ${OUTPUT_DIR}/${dir})
endmacro()
message("Current Qt Version: ${QT_VERSION_MAJOR}")
message("Current Dtk Version: ${DTK_VERSION_MAJOR}")
set(OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
set (LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
set (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/dtk${PROJECT_VERSION_MAJOR}/DCore")
set (TOOL_INSTALL_DIR "${CMAKE_INSTALL_LIBEXECDIR}/dtk${PROJECT_VERSION_MAJOR}/DCore/bin")
set (MKSPECS_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/qt${QT_VERSION_MAJOR}/mkspecs/modules" CACHE STRING "Install dir for qt pri files")
set (FEATURES_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/qt${QT_VERSION_MAJOR}/mkspecs/features" CACHE STRING "Install dir for qt prf files")
set (CONFIG_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${DtkCore}" CACHE STRING "Install dir for cmake config files")
set (DSG_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}" CACHE STRING "PREFIX of DSG_DATA_DIRS")
set (DSYSINFO_PREFIX "" CACHE STRING "PREFIX of DSysInfo")
set (BUILD_EXAMPLES ON CACHE BOOL "Build examples")
set (BUILD_VERSION "0" CACHE STRING "buildversion")
if(UNIX AND NOT APPLE)
set(LINUX TRUE)
endif()
set (BUILD_WITH_SYSTEMD OFF CACHE BOOL "Build with systemd")
if (BUILD_WITH_SYSTEMD)
add_definitions(-DBUILD_WITH_SYSTEMD)
endif()
set(CMAKE_CXX_STANDARD 17)
# CXX FILAGS
if("${QT_VERSION_MAJOR}" STREQUAL "5")
set (BUILD_DOCS ON CACHE BOOL "Generate doxygen-based documentation")
else()
# dtk6 not build doc
set (BUILD_DOCS OFF CACHE BOOL "Generate doxygen-based documentation")
endif()
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wextra")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--as-needed")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed -pie")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(BUILD_TESTING ON)
endif ()
string(REPLACE "-O3" "-Ofast" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
endif()
if (BUILD_DOCS)
add_sub_dir(docs)
endif ()
add_sub_dir(src)
if(BUILD_TESTING)
message("==================================")
message(" Now Testing is enabled ")
message("==================================")
enable_testing()
add_sub_dir(tests)
endif()
if(BUILD_EXAMPLES)
message("===================================")
message("You can build and run examples now ")
message("===================================")
add_sub_dir(examples)
endif()
add_sub_dir(tools)
if("${QT_VERSION_MAJOR}" STREQUAL "6")
set(DTK_VERSION_MAJOR 6)
endif()
configure_package_config_file(cmake/DtkCMake/DtkCMakeConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake/DtkCMake/Dtk${DTK_VERSION_MAJOR}CMakeConfig.cmake
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Dtk${DTK_VERSION_MAJOR}CMake"
PATH_VARS TOOL_INSTALL_DIR)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/DtkCMake/Dtk${DTK_VERSION_MAJOR}CMakeConfig.cmake
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Dtk${DTK_VERSION_MAJOR}CMake")
configure_package_config_file(cmake/DtkTools/DtkToolsConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake/DtkTools/Dtk${DTK_VERSION_MAJOR}ToolsConfig.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Dtk${DTK_VERSION_MAJOR}Tools
PATH_VARS TOOL_INSTALL_DIR)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/DtkTools/Dtk${DTK_VERSION_MAJOR}ToolsConfig.cmake
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Dtk${DTK_VERSION_MAJOR}Tools")
install(FILES cmake/DtkTools/DtkSettingsToolsMacros.cmake
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Dtk${DTK_VERSION_MAJOR}Tools"
RENAME Dtk${DTK_VERSION_MAJOR}SettingsToolsMacros.cmake)
install(FILES cmake/DtkTools/DtkDBusMacros.cmake
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Dtk${DTK_VERSION_MAJOR}Tools")
install(FILES ${CMAKE_SOURCE_DIR}/cmake/DtkTools/DtkDConfigMacros.cmake
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Dtk${DTK_VERSION_MAJOR}Tools")
if (NOT DTK_VERSION_MAJOR)
set(DCONFIG_DEPRECATED_FUNCS [=[
# deprecated since dtk6
function(dconfig_meta_files)
dtk_add_config_meta_files(${ARGV})
endfunction()
function(dconfig_override_files)
dtk_add_config_override_files(${ARGV})
endfunction()]=])
endif()
configure_package_config_file(cmake/DtkDConfig/DtkDConfigConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake/DtkDConfig/Dtk${DTK_VERSION_MAJOR}DConfigConfig.cmake
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Dtk${DTK_VERSION_MAJOR}DConfig"
PATH_VARS TOOL_INSTALL_DIR)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/DtkDConfig/Dtk${DTK_VERSION_MAJOR}DConfigConfig.cmake
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Dtk${DTK_VERSION_MAJOR}DConfig")
configure_package_config_file(misc/DtkCoreConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${DtkCore}Config.cmake
INSTALL_DESTINATION ${CONFIG_CMAKE_INSTALL_DIR}
PATH_VARS TOOL_INSTALL_DIR)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/${DtkCore}ConfigVersion.cmake"
VERSION ${DTK_VERSION}
COMPATIBILITY SameMajorVersion
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DtkCore}Config.cmake DESTINATION ${CONFIG_CMAKE_INSTALL_DIR})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DtkCore}ConfigVersion.cmake DESTINATION ${CONFIG_CMAKE_INSTALL_DIR})
configure_file(misc/dtkcore.pc.in ${LIB_NAME}.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME}.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
configure_file(misc/qt_lib_dtkcore.pri.in qt_lib_dtkcore.pri @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qt_lib_dtkcore.pri DESTINATION "${MKSPECS_INSTALL_DIR}")
install(FILES misc/dtk_install_dconfig.prf DESTINATION ${FEATURES_INSTALL_DIR})
set(CONFIGNAME include/global/dtkcore_config.h)
file(WRITE ${CONFIGNAME}
"// it is auto make config\n"
"#define DTK_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}\n"
"#define DTK_VERSION_MINOR ${PROJECT_VERSION_MINOR}\n"
"#define DTK_VERSION_PATCH ${PROJECT_VERSION_PATCH}\n"
"#define DTK_VERSION_BUILD ${BUILD_VERSION}\n"
"#define DTK_VERSION_STR \"${PROJECT_VERSION}\"\n"
"\n"
)
file(GLOB CONFIGSOURCE include/DtkCore/*)
foreach(FILENAME ${CONFIGSOURCE})
get_filename_component(thefile ${FILENAME} NAME)
file(APPEND ${CONFIGNAME} "#define DTKCORE_CLASS_${thefile}\n")
endforeach()

View File

@ -1 +0,0 @@
load(dtk_lib)

Some files were not shown because too many files have changed in this diff Show More