Make recent file icons update on saving
Reload the file icon after saving a file.
I have thought of generating the file icon directly from the KisDocument
, but I realized that when KisDocument::sigSavingFinished
is emitted, the document may already have been modified by the user, so it is not a very reliable way of generating the file icon.
@dkazakov please check the second commit. I added a filePath parameter to the sigSavingFinished so that it gets the correct file path after exporting a file. The KisDocument
sender contains the path of the original document, which would not be what the export function have written to.
Test Plan
- Open a .kra file
- Check the file thumbnail in the recent files menu
- Modify and save the file
- Check that the file thumbnail in the recent files menu has changed.
Formalities Checklist
-
I confirmed this builds. -
I confirmed Krita ran and the relevant functions work. -
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.