Skip to content

fix: improve SVG icon cache validation#268

Merged
18202781743 merged 1 commit intolinuxdeepin:masterfrom
18202781743:master
May 26, 2025
Merged

fix: improve SVG icon cache validation#268
18202781743 merged 1 commit intolinuxdeepin:masterfrom
18202781743:master

Conversation

@18202781743
Copy link
Contributor

  1. Added QFileInfo check for SVG file existence and lastModified
    validity before cache processing
  2. Moved svgFileInfo creation outside conditional block for reuse
  3. Ensures cache invalidation properly checks file modification times
  4. Prevents potential cache issues with invalid file timestamps

fix: 改进SVG图标缓存验证

  1. 在缓存处理前添加对SVG文件存在性和最后修改时间的QFileInfo检查
  2. 将svgFileInfo创建移到条件块外以便重用
  3. 确保缓存失效时正确检查文件修改时间
  4. 防止因无效文件时间戳导致的潜在缓存问题

1. Added QFileInfo check for SVG file existence and lastModified
validity before cache processing
2. Moved svgFileInfo creation outside conditional block for reuse
3. Ensures cache invalidation properly checks file modification times
4. Prevents potential cache issues with invalid file timestamps

fix: 改进SVG图标缓存验证

1. 在缓存处理前添加对SVG文件存在性和最后修改时间的QFileInfo检查
2. 将svgFileInfo创建移到条件块外以便重用
3. 确保缓存失效时正确检查文件修改时间
4. 防止因无效文件时间戳导致的潜在缓存问题
@18202781743 18202781743 requested review from BLumia and mhduiy May 23, 2025 04:36
deepin-ci-robot added a commit to linuxdeepin/qt6integration that referenced this pull request May 23, 2025
Synchronize source files from linuxdeepin/qt5integration.

Source-pull-request: linuxdeepin/qt5integration#268
@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

关键摘要:

  • 在新添加的代码中,svgFileInfo 对象被重复创建,建议将其移动到条件判断之外以提高效率。
  • 注释中提到的问题(ostree管理的源文件 lastModified 被重置为1970-01-01)需要进一步确认是否会影响功能,并考虑是否有其他解决方案。

是否建议立即修改:

  • 是,建议立即修改重复创建 svgFileInfo 对象的问题,以提高代码效率。
  • 是,建议进一步调查注释中提到的问题,并确保代码的健壮性。

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, mhduiy

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@18202781743 18202781743 merged commit 6057cdd into linuxdeepin:master May 26, 2025
16 of 20 checks passed
18202781743 pushed a commit to linuxdeepin/qt6integration that referenced this pull request May 26, 2025
Synchronize source files from linuxdeepin/qt5integration.

Source-pull-request: linuxdeepin/qt5integration#268
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants