From 805e039e74d052439f3978ac96179a66a4bc0053 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 11 Oct 2016 11:03:56 +0200 Subject: [PATCH] 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 --- wallpapers/image/backgroundlistmodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wallpapers/image/backgroundlistmodel.cpp b/wallpapers/image/backgroundlistmodel.cpp index c85aefc08..b30d86dad 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);