Commit 0811bf4a authored by David Lerch's avatar David Lerch
Browse files

Use only enabled preview plugins in InformationPanelContent and ToolTipManager.

parent d691aa96
Pipeline #51656 passed with stage
in 7 minutes and 3 seconds
......@@ -8,11 +8,13 @@
#include <KIO/JobUiDelegate>
#include <KIO/PreviewJob>
#include <KConfigGroup>
#include <KIconEffect>
#include <KIconLoader>
#include <KJobWidgets>
#include <KLocalizedString>
#include <KSeparator>
#include <KSharedConfig>
#include <KStringHandler>
#include <QPainterPath>
......@@ -184,7 +186,8 @@ void InformationPanelContent::refreshPixmapView()
// can be shown within a short timeframe.
m_outdatedPreviewTimer->start();
QStringList plugins = KIO::PreviewJob::availablePlugins();
const KConfigGroup globalConfig(KSharedConfig::openConfig(), "PreviewSettings");
const QStringList plugins = globalConfig.readEntry("Plugins", KIO::PreviewJob::defaultPlugins());
m_previewJob = new KIO::PreviewJob(KFileItemList() << m_item,
QSize(m_preview->width(), m_preview->height()),
&plugins);
......
......@@ -10,7 +10,9 @@
#include <KIO/JobUiDelegate>
#include <KIO/PreviewJob>
#include <KConfigGroup>
#include <KJobWidgets>
#include <KSharedConfig>
#include <KToolTipWidget>
#include <KIconLoader>
......@@ -132,7 +134,8 @@ void ToolTipManager::startContentRetrieval()
// Request a preview of the item
m_fileMetaDataWidget->setPreview(QPixmap());
QStringList plugins = KIO::PreviewJob::availablePlugins();
const KConfigGroup globalConfig(KSharedConfig::openConfig(), "PreviewSettings");
const QStringList plugins = globalConfig.readEntry("Plugins", KIO::PreviewJob::defaultPlugins());
KIO::PreviewJob* job = new KIO::PreviewJob(KFileItemList() << m_item,
QSize(256, 256),
&plugins);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment