plasma: Plasma::Wallpaper::insertIntoCache() optimization

only for the case when build without KIO

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-06-02 16:09:22 +03:00
parent a50ed438a3
commit 700d1f4317

View file

@ -602,8 +602,7 @@ void Wallpaper::insertIntoCache(const QString& key, const QImage &image)
#ifndef PLASMA_NO_KIO
KIO::file_delete(d->cachePath(key));
#else
QFile f(d->cachePath(key));
f.remove();
QFile::remove(d->cachePath(key));
#endif
} else {
image.save(d->cachePath(key), imageFormat, 100);