enable all preview plugins

Summary:
try to preview everything that's found in the list.
by default not all image types are enabled, like
svg, which is a supported wallpaper type

Test Plan: svg files are correctly previewed in the thumbnail grid

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3017
wilder-5.14
Marco Martin 10 years ago
parent 56817acf9f
commit 805e039e74
  1. 3
      wallpapers/image/backgroundlistmodel.cpp

@ -350,9 +350,10 @@ QVariant BackgroundListModel::data(const QModelIndex &index, int role) const
KFileItemList list;
list.append(KFileItem(file, QString(), 0));
QStringList availablePlugins = KIO::PreviewJob::availablePlugins();
KIO::PreviewJob* job = KIO::filePreview(list,
QSize(m_screenshotSize*1.6,
m_screenshotSize));
m_screenshotSize), &availablePlugins);
job->setIgnoreMaximumSize(true);
connect(job, &KIO::PreviewJob::gotPreview,
this, &BackgroundListModel::showPreview);

Loading…
Cancel
Save