Bug 431146

Summary: Tags are not preserved when an image is edited and saved with Gwenview.
Product: [Applications] gwenview Reporter: tagwerk19
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: ASSIGNED ---    
Severity: normal CC: 4wy78uwh, funkybomber, nate, tilrnz
Priority: NOR    
Version: 20.12.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description tagwerk19 2021-01-04 14:47:01 UTC
SUMMARY:

    Tags are not preserved when an image is edited and saved with Gwenview.

STEPS TO REPRODUCE:

    Attach a tag to an image file, open with Gwenview, rotate and save

OBSERVED RESULTS

    The saved (overwritten) file does not have the tag

EXPECTED RESULTS

    The xattr tags are saved with the updated file

SOFTWARE/OS VERSIONS

    Neon Testing

    Gwenview : 20.12.1
    Plasma : 5.20.4
    Frameworks : 5.78.0
    Qt : 5.15.2 

ADDITIONAL INFORMATION

    Gwenview reads the extended attributes (it shows the tags, comments
    and ratings in the information panel), it does not write them back
    to disc when saving the file

    The code ought to be there as if you edit the tags in Gwenview,
    they are written to disc...

    This is another a 'special case' of Bug 116617.
Comment 1 Bug Janitor Service 2023-11-15 13:35:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/gwenview/-/merge_requests/238
Comment 2 Tino Lorenz 2024-07-08 00:26:54 UTC
Relevant Qt bug: https://bugreports.qt.io/browse/QTBUG-56366
Comment 3 tagwerk19 2024-07-08 08:46:20 UTC
(In reply to Tino Lorenz from comment #2)
> Relevant Qt bug: https://bugreports.qt.io/browse/QTBUG-56366
Thank you!

... I don't know Gwenview internals, but an application that saves to a new file and then "mv"s it on top of the original will need to write the xattr to the "new". Similar rationale if the original is shifted to a .bak and the edited copy saved to the original name.

It would be nice if a Qt fix solves the issue for a bunch of applications but it could be that there's still work needed at the application layer.