Commit 80fe34c
fix: remove duplicate wallpaper blurhash assignment
1. Removed redundant assignment of m_wallpaperBlurhash variable in
updateAllWallpaper() method
2. The blurhash value was already being stored in m_wallpaperBlurMap
with wallpaperUrl as key
3. The updateCurrentWallpaperBlurhash() method properly handles setting
the current blurhash from the map
4. This eliminates duplicate data storage and potential inconsistency
between the two variables
Influence:
1. Verify wallpaper blurhash functionality still works correctly
2. Test wallpaper switching and blurhash updates
3. Check that m_wallpaperBlurMap properly stores and retrieves blurhash
values
4. Ensure no memory leaks or performance issues from the removed
assignment
fix: 移除重复的壁纸模糊哈希赋值
1. 在 updateAllWallpaper() 方法中移除了对 m_wallpaperBlurhash 变量的冗余
赋值
2. 模糊哈希值已经以 wallpaperUrl 为键存储在 m_wallpaperBlurMap 中
3. updateCurrentWallpaperBlurhash() 方法会正确地从映射中设置当前模糊哈希
4. 这消除了重复数据存储和两个变量之间潜在的不一致问题
Influence:
1. 验证壁纸模糊哈希功能仍然正常工作
2. 测试壁纸切换和模糊哈希更新
3. 检查 m_wallpaperBlurMap 是否正确存储和检索模糊哈希值
4. 确保移除赋值不会导致内存泄漏或性能问题
由于没有信号让页面更新,故将其删除,赋值操作采用如下方式处理:
if (m_wallpaperBlurMap.contains(wallpaperUrl)) {
QString newBlurhash = m_wallpaperBlurMap.value(wallpaperUrl);
if (m_wallpaperBlurhash != newBlurhash) {
m_wallpaperBlurhash = newBlurhash;
emit wallpaperBlurhashChanged();
}
PMS: BUG-2893071 parent 12176f2 commit 80fe34c
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | 171 | | |
173 | 172 | | |
174 | 173 | | |
| |||
0 commit comments