Bug 395447 - wallpaper selection menu shows old thumbnail when files are replaced
Summary: wallpaper selection menu shows old thumbnail when files are replaced
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Image Wallpaper (show other bugs)
Version: master
Platform: Arch Linux Linux
: NOR minor
Target Milestone: 1.0
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-15 17:56 UTC by anonymous
Modified: 2018-10-10 12:30 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.15.0


Attachments
Screenshot that shows the thumbnail of the wallpapers not being updated. (807.56 KB, image/png)
2018-06-15 17:56 UTC, anonymous
Details

Note You need to log in before you can comment on or make changes to this bug.
Description anonymous 2018-06-15 17:56:56 UTC
Created attachment 113355 [details]
Screenshot that shows the thumbnail of the wallpapers not being updated.

The wallpaper selection screen under plasma 5.13 doesn't update the thumbnails shown when a new wallpaper has the same name. I stumbled upon this when I updated to plasma 5.13 because the default wallpaper was replaced but in the selection menu it still showed the old one.

The manual fix is to delete ~/.cache/plasma_wallpaper_preview.kcache so that it will be rebuild. 

I added a screenshot with two different files to show what the issue looks like.
Comment 1 Alexander Mentyu 2018-10-08 21:47:40 UTC
Can reproduce

Operating System: KDE neon Developer Edition
KDE Plasma Version: 5.14.80
Qt Version: 5.11.1
KDE Frameworks Version: 5.51.0
Comment 2 Kai Uwe Broulik 2018-10-10 08:10:50 UTC
From what I can tell the wallpaper list uses its own KImageCache but never invalidates it. This is despite just using KIO::PreviewJob which has its own caching anyway.
Comment 3 Kai Uwe Broulik 2018-10-10 10:05:15 UTC
Git commit de6f8246ecabc3a4102c7c29ce3a7f6c4987cfec by Kai Uwe Broulik.
Committed on 10/10/2018 at 10:04.
Pushed by broulik into branch 'master'.

[Background Model] Use own QCache for thumbnails

Previously it would use an on-disk KImageCache which would never be invalidated.
Moreover, it just uses KIO::PreviewJob which does its own more clever (compares mtime and other properties) on-disk caching already.

It is using its own QCache rather than QPixmapCache to not jeopardize other caching for the potentially large wallpaper thumbnails
that are only relevant while the dialog is open.
FIXED-IN: 5.15.0

Differential Revision: https://phabricator.kde.org/D16095

M  +0    -1    wallpapers/image/CMakeLists.txt
M  +13   -15   wallpapers/image/backgroundlistmodel.cpp
M  +2    -3    wallpapers/image/backgroundlistmodel.h

https://commits.kde.org/plasma-workspace/de6f8246ecabc3a4102c7c29ce3a7f6c4987cfec