From kde-commits Fri Jan 11 11:48:42 2008 From: Alex Merry Date: Fri, 11 Jan 2008 11:48:42 +0000 To: kde-commits Subject: KDE/kdebase/workspace/plasma/containments/desktop Message-Id: <1200052122.365939.31750.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120005213101517 SVN commit 759884 by alexmerry: Move the existence check to the renderthread - the preview will now show a blank (solid colour) desktop if the file doesn't exist. And the "None" option for wallpaper works again. M +1 -3 backgrounddialog.cpp M +2 -1 renderthread.cpp --- trunk/KDE/kdebase/workspace/plasma/containments/desktop/backgrounddialog.cpp #759883:759884 @@ -584,9 +584,7 @@ void BackgroundDialog::setPreview(const QString& img, Background::ResizeMethod method) { - if (QFile::exists(img)) { - m_preview_token = m_preview_renderer.render(img, m_color->color(), method, Qt::FastTransformation); - } + m_preview_token = m_preview_renderer.render(img, m_color->color(), method, Qt::FastTransformation); } void BackgroundDialog::slotAddDir() --- trunk/KDE/kdebase/workspace/plasma/containments/desktop/renderthread.cpp #759883:759884 @@ -10,6 +10,7 @@ #include "renderthread.h" #include +#include #include #include @@ -100,7 +101,7 @@ QImage result(size, QImage::Format_ARGB32_Premultiplied); result.fill(color.rgb()); - if (file.isEmpty()) { + if (file.isEmpty() || !QFile::exists(file)) { emit done(token, result); }