summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Martin <[email protected]>2016-10-11 11:03:56 +0200
committerMarco Martin <[email protected]>2016-10-11 12:39:00 +0200
commitc05f2fc2171e5c6eabb6dc52f9cf4aa6a5628bbb (patch)
tree872f540768fbdcbe0be442f8385e84c01cd660dd
parent0af2e5deb23af28abb5970bc1602af7dc816f087 (diff)
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
-rw-r--r--wallpapers/image/backgroundlistmodel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/wallpapers/image/backgroundlistmodel.cpp b/wallpapers/image/backgroundlistmodel.cpp
index c85aefc..b30d86d 100644
--- a/wallpapers/image/backgroundlistmodel.cpp
+++ b/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);