Skip to content

Only remove recents item if file doesn't exist

Alvin Wong requested to merge alvinwong/krita:alvin/no-remove-recent into master

This prevents recents item from being removed just because a file preview icon cannot be generated. This is true for at least heif and avif files, at least currently..

This fixes heif/avif not being added to the recents list.

File preview icons are generated in libs/ui/utils/KisFileIconCreator.cpp. There is currently no special handling for heif/avif, and no included QImage plugins support them. An alternative solution is to implement custom icon generation for these formats, but there might also be other file formats being affected by this issue.

Test Plan

  1. Open heif/avif file
  2. Check that it is available in the recents list (both menu and welcome screen)

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • n/a I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports