Commit d2ebd8f
feat: manage QML cache versioning proactively
Added QML cache management to handle version changes and prevent stale
cache issues. The changes include:
1. Added refreshQmlCache() function to manage QML disk cache based on
application version
2. Moved application version setting earlier in main() to enable cache
management
3. The cache management function checks for existing cache directory and
removes it if version mismatch is detected
4. Creates new cache directory with current version to ensure fresh
QML compilation
5. Added QDir include for directory operations
This change is necessary because QML cache can become stale when
application version changes, leading to potential runtime issues. By
proactively managing the cache directory based on version, we ensure
that QML components are recompiled when needed.
Log: Improved QML cache management to handle version changes
automatically
Influence:
1. Test application startup with different version strings
2. Verify QML cache directory creation and cleanup
3. Test with QML_DISK_CACHE_PATH environment variable set
4. Verify QML component loading after version change
5. Test cache persistence across application restarts
6. Monitor for any QML compilation performance changes
feat: 主动管理 QML 缓存版本控制
添加了 QML 缓存管理功能以处理版本变更并防止缓存过期问题。变更包括:
1. 添加 refreshQmlCache() 函数来根据应用版本管理 QML 磁盘缓存
2. 将应用版本设置移到 main() 函数更早的位置以启用缓存管理
3. 缓存管理函数检查现有缓存目录,如果检测到版本不匹配则删除旧缓存
4. 创建带有当前版本的新缓存目录以确保 QML 重新编译
5. 添加 QDir 包含以支持目录操作
此变更是必要的,因为当应用版本变更时,QML 缓存可能变得过时,导致潜在的
运行时问题。通过基于版本主动管理缓存目录,我们确保在需要时重新编译 QML
组件。
Log: 改进 QML 缓存管理以自动处理版本变更
Influence:
1. 使用不同版本字符串测试应用启动
2. 验证 QML 缓存目录的创建和清理
3. 测试设置 QML_DISK_CACHE_PATH 环境变量的情况
4. 验证版本变更后的 QML 组件加载
5. 测试跨应用重启的缓存持久性
6. 监控 QML 编译性能变化1 parent c96fceb commit d2ebd8f
1 file changed
+32
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
54 | 76 | | |
55 | 77 | | |
56 | 78 | | |
| |||
60 | 82 | | |
61 | 83 | | |
62 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
63 | 95 | | |
64 | 96 | | |
65 | 97 | | |
| |||
129 | 161 | | |
130 | 162 | | |
131 | 163 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | 164 | | |
141 | 165 | | |
142 | 166 | | |
| |||
0 commit comments