Commit 0f67b44
committed
refactor: move QML registration to factory initialization
1. Moved QML type registrations from DccNetwork constructor to
DCC_FACTORY_INITIALIZE lambda
2. This ensures QML registrations happen in the main thread during
factory initialization
3. Previously registrations occurred in constructor which could be
called from non-main threads
4. Using DCC_FACTORY_INITIALIZE ensures proper timing for factory
initialization
Influence:
1. Verify network module QML components are properly registered and
accessible
2. Test network module functionality in QML applications
3. Ensure no threading issues during module initialization
4. Verify factory initialization timing doesn't affect module loading
refactor: 将QML注册移动到工厂初始化中
1. 将QML类型注册从DccNetwork构造函数移动到DCC_FACTORY_INITIALIZE lambda
表达式
2. 确保QML注册在主线程中执行,在工厂初始化期间完成
3. 之前注册在构造函数中进行,可能从非主线程调用
4. 使用DCC_FACTORY_INITIALIZE确保工厂初始化的正确时机
Influence:
1. 验证网络模块QML组件是否正确注册并可访问
2. 测试QML应用程序中的网络模块功能
3. 确保模块初始化期间没有线程问题
4. 验证工厂初始化时机不影响模块加载1 parent 1cf9591 commit 0f67b44
1 file changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 29 | | |
34 | 30 | | |
35 | 31 | | |
| |||
202 | 198 | | |
203 | 199 | | |
204 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
205 | 207 | | |
206 | 208 | | |
207 | 209 | | |
| |||
0 commit comments