┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information/informationpanelcontent.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-01-18 19:56:18 +0000
committerPeter Penz <[email protected]>2011-01-18 19:56:18 +0000
commit2fa1dce9772b556d85b875f6d7d4bf1b466e6dca (patch)
treec50508602747a2971d5c8a82b1fe8dbcc738cf0d /src/panels/information/informationpanelcontent.cpp
parent4dd1ed179df79fa71be4a11f63bb81abb44cbae8 (diff)
Assure that the enabled plugins for previews are set for the Information Panel and the tooltips. This fixes the issue that a disabled thumbnail-plugin might be chosen. For 4.7 it should be considered to move this code into KIO::filePreview() as default already (will provide a patch on the reviewboard).
svn path=/trunk/KDE/kdebase/apps/; revision=1215459
Diffstat (limited to 'src/panels/information/informationpanelcontent.cpp')
-rw-r--r--src/panels/information/informationpanelcontent.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp
index 591c47ff7..e09ccdf5c 100644
--- a/src/panels/information/informationpanelcontent.cpp
+++ b/src/panels/information/informationpanelcontent.cpp
@@ -63,7 +63,8 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) :
m_phononWidget(0),
m_nameLabel(0),
m_metaDataWidget(0),
- m_metaDataArea(0)
+ m_metaDataArea(0),
+ m_enabledPlugins()
{
parent->installEventFilter(this);
@@ -173,13 +174,16 @@ void InformationPanelContent::showItem(const KFileItem& item)
m_outdatedPreviewTimer->start();
}
- KIO::PreviewJob* job = KIO::filePreview(KFileItemList() << item,
- m_preview->width(),
- m_preview->height(),
- 0,
- 0,
- false,
- true);
+ if (m_enabledPlugins.isEmpty()) {
+ const KConfigGroup globalConfig(KGlobal::config(), "PreviewSettings");
+ m_enabledPlugins = globalConfig.readEntry("Plugins", QStringList()
+ << "directorythumbnail"
+ << "imagethumbnail"
+ << "jpegthumbnail");
+ }
+
+ KIO::PreviewJob* job = KIO::filePreview(KFileItemList() << item, m_preview->width(), m_preview->height(),
+ 0, 0, false, true, &m_enabledPlugins);
connect(job, SIGNAL(gotPreview(const KFileItem&, const QPixmap&)),
this, SLOT(showPreview(const KFileItem&, const QPixmap&)));