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 @@ ...@@ -8,11 +8,13 @@
#include <KIO/JobUiDelegate> #include <KIO/JobUiDelegate>
#include <KIO/PreviewJob> #include <KIO/PreviewJob>
#include <KConfigGroup>
#include <KIconEffect> #include <KIconEffect>
#include <KIconLoader> #include <KIconLoader>
#include <KJobWidgets> #include <KJobWidgets>
#include <KLocalizedString> #include <KLocalizedString>
#include <KSeparator> #include <KSeparator>
#include <KSharedConfig>
#include <KStringHandler> #include <KStringHandler>
#include <QPainterPath> #include <QPainterPath>
...@@ -184,7 +186,8 @@ void InformationPanelContent::refreshPixmapView() ...@@ -184,7 +186,8 @@ void InformationPanelContent::refreshPixmapView()
// can be shown within a short timeframe. // can be shown within a short timeframe.
m_outdatedPreviewTimer->start(); 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, m_previewJob = new KIO::PreviewJob(KFileItemList() << m_item,
QSize(m_preview->width(), m_preview->height()), QSize(m_preview->width(), m_preview->height()),
&plugins); &plugins);
......
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
#include <KIO/JobUiDelegate> #include <KIO/JobUiDelegate>
#include <KIO/PreviewJob> #include <KIO/PreviewJob>
#include <KConfigGroup>
#include <KJobWidgets> #include <KJobWidgets>
#include <KSharedConfig>
#include <KToolTipWidget> #include <KToolTipWidget>
#include <KIconLoader> #include <KIconLoader>
...@@ -132,7 +134,8 @@ void ToolTipManager::startContentRetrieval() ...@@ -132,7 +134,8 @@ void ToolTipManager::startContentRetrieval()
// Request a preview of the item // Request a preview of the item
m_fileMetaDataWidget->setPreview(QPixmap()); 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, KIO::PreviewJob* job = new KIO::PreviewJob(KFileItemList() << m_item,
QSize(256, 256), QSize(256, 256),
&plugins); &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