Bug 463140

Summary: PreviewJob: Thumbnails are not saved to disk on Windows
Product: [Frameworks and Libraries] frameworks-kio Reporter: george fb <georgefb899>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kdelibs-bugs-null
Priority: NOR    
Version First Reported In: 5.101.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description george fb 2022-12-17 02:01:27 UTC
SUMMARY
This is caused because on Windows the StatJob [link1] can't get the device id (it's always 0) [link2]; can get one with KFileItem though.

[link1] https://invent.kde.org/frameworks/kio/-/blob/9a71657097303ef60b1915c3218faab4fae42f7d/src/widgets/previewjob.cpp#L838
[link2] https://invent.kde.org/frameworks/kio/-/blob/9a71657097303ef60b1915c3218faab4fae42f7d/src/widgets/previewjob.cpp#L633

STEPS TO REPRODUCE
1. Run the previewtest from KIO
2. Insert path to an image in the text field
3. Click generate thumbnail
4. Check thumbnails folder (C:/Users/<username>/AppData/Local/cache/thumbnails/<size>)

OBSERVED RESULT
There is no thumbnail in the cache/thumbnails/<size> folder, even though there is one in the app

EXPECTED RESULT
Thumbnail should be present in the cache/thumbnails/<size> folder

SOFTWARE/OS VERSIONS
Windows: 10/11
KDE Frameworks Version: 100/101
Qt Version: 5.12.7
Comment 1 Bug Janitor Service 2023-01-08 17:21:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1104
Comment 2 Méven Car 2023-01-19 09:04:04 UTC
Git commit dfa417c616d49a61fae08eb67925b77817253dc6 by Méven Car, on behalf of George Florea Bănuș.
Committed on 19/01/2023 at 08:20.
Pushed by meven into branch 'master'.

previewjob: fix thumbnails not saving to disk on windows

M  +13   -0    src/widgets/previewjob.cpp

https://invent.kde.org/frameworks/kio/commit/dfa417c616d49a61fae08eb67925b77817253dc6