[plasma/plasma-workspace] wallpapers/image/plugin/utils: wallpapers/image: Avoid temporary loading of wallpaper image
Nicolas Fella <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit f5ae30906c1c8a612bb1f6173168345528960e4b by Nicolas Fella.
Committed on 16/08/2026 at 12:14.
Pushed by nicolasfella into branch 'master'.
wallpapers/image: Avoid temporary loading of wallpaper image
The code loads the wallpaper to check if it can be loaded.
Since wallpapers are typically large images this can take
quite some time (~120ms), and while doing that startup
is blocked.
We seem to do this to handle the image not being loadable,
but that's the wrong place to check this.
M +1 -2 wallpapers/image/plugin/utils/mediaproxy.cpp
https://invent.kde.org/plasma/plasma-workspace/-/commit/f5ae30906c1c8a612bb1f6173168345528960e4b
diff --git a/wallpapers/image/plugin/utils/mediaproxy.cpp b/wallpapers/image/plugin/utils/mediaproxy.cpp
index a147c380d9..d690ef25d8 100644
--- a/wallpapers/image/plugin/utils/mediaproxy.cpp
+++ b/wallpapers/image/plugin/utils/mediaproxy.cpp
@@ -176,8 +176,7 @@ void MediaProxy::useSingleImageDefaults()
WallpaperPackage::findPreferredImageInPackage(package, m_targetSize);
- // Make sure the image can be read, or there will be dead loops.
- if (m_source.isEmpty() || QImage(package.filePath("preferred")).isNull()) {
+ if (m_source.isEmpty()) {
return;
}