refactor: optimize plugin loading and QML registration#3143
Open
caixr23 wants to merge 2 commits intolinuxdeepin:dcc-coredumpfrom
Open
refactor: optimize plugin loading and QML registration#3143caixr23 wants to merge 2 commits intolinuxdeepin:dcc-coredumpfrom
caixr23 wants to merge 2 commits intolinuxdeepin:dcc-coredumpfrom
Conversation
This refactor improves plugin management by separating QML registration from plugin object creation. Key changes include: 1. Added QML_ENGINE_PROPERTY constant for QML engine property name 2. Modified DCC_FACTORY_CLASS macro to accept variadic arguments for QML registration 3. Added dccObject() method in factory to handle QML type registration on main thread 4. Created containsByName() method for more efficient module filtering 5. Improved plugin loading sequence with proper thread management 6. Moved all QML registration calls from constructors to factory's dccObject() method 7. Removed unnecessary QML integration headers from model classes The changes ensure QML type registration happens on the main thread while plugin objects are created in worker threads, preventing threading issues and improving performance. Log: Optimized plugin loading process and QML registration Influence: 1. Test plugin loading and module display in control center 2. Verify all QML components are properly registered and accessible 3. Check module hiding functionality with wildcard patterns 4. Test thread safety during plugin initialization 5. Verify no regression in existing functionality refactor: 优化插件加载和 QML 注册流程 本次重构改进了插件管理机制,将 QML 注册与插件对象创建分离。主要变更 包括: 1. 添加 QML_ENGINE_PROPERTY 常量用于 QML 引擎属性名 2. 修改 DCC_FACTORY_CLASS 宏支持可变参数用于 QML 注册 3. 在工厂类中添加 dccObject() 方法处理主线程中的 QML 类型注册 4. 创建 containsByName() 方法实现更高效的模块过滤 5. 改进插件加载序列,优化线程管理 6. 将所有 QML 注册调用从构造函数移至工厂的 dccObject() 方法 7. 从模型类中移除不必要的 QML 集成头文件 这些变更确保 QML 类型注册在主线程执行,而插件对象在工作线程创建,避免线 程问题并提升性能。 Log: 优化插件加载过程和 QML 注册机制 Influence: 1. 测试控制中心插件加载和模块显示 2. 验证所有 QML 组件正确注册并可访问 3. 检查通配符模式下的模块隐藏功能 4. 测试插件初始化期间的线程安全性 5. 验证现有功能无回归 PMS: BUG-309197
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: caixr23 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This refactor improves plugin management by separating QML registration from plugin object creation. Key changes include:
The changes ensure QML type registration happens on the main thread while plugin objects are created in worker threads, preventing threading issues and improving performance.
Log: Optimized plugin loading process and QML registration
Influence:
refactor: 优化插件加载和 QML 注册流程
本次重构改进了插件管理机制,将 QML 注册与插件对象创建分离。主要变更
包括:
这些变更确保 QML 类型注册在主线程执行,而插件对象在工作线程创建,避免线
程问题并提升性能。
Log: 优化插件加载过程和 QML 注册机制
Influence:
PMS: BUG-309197