diff options
| author | Peter Penz <[email protected]> | 2011-01-18 19:56:18 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-01-18 19:56:18 +0000 |
| commit | 2fa1dce9772b556d85b875f6d7d4bf1b466e6dca (patch) | |
| tree | c50508602747a2971d5c8a82b1fe8dbcc738cf0d /src/views/tooltips/tooltipmanager.cpp | |
| parent | 4dd1ed179df79fa71be4a11f63bb81abb44cbae8 (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/views/tooltips/tooltipmanager.cpp')
| -rw-r--r-- | src/views/tooltips/tooltipmanager.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/views/tooltips/tooltipmanager.cpp b/src/views/tooltips/tooltipmanager.cpp index 09e97861a..fdf83d13d 100644 --- a/src/views/tooltips/tooltipmanager.cpp +++ b/src/views/tooltips/tooltipmanager.cpp @@ -20,8 +20,10 @@ #include "tooltipmanager.h" #include "filemetadatatooltip.h" +#include <KConfigGroup> #include <KIcon> #include <KIO/PreviewJob> +#include <KSharedConfig> #include <QApplication> #include <QDesktopWidget> @@ -45,7 +47,8 @@ ToolTipManager::ToolTipManager(QAbstractItemView* parent, m_metaDataRequested(false), m_appliedWaitCursor(false), m_item(), - m_itemRect() + m_itemRect(), + m_enabledPlugins() { static FileMetaDataToolTip* sharedToolTip = 0; if (sharedToolTip == 0) { @@ -168,7 +171,14 @@ void ToolTipManager::startContentRetrieval() // Request a preview of the item m_fileMetaDataToolTip->setPreview(QPixmap()); - KIO::PreviewJob* job = KIO::filePreview(KFileItemList() << m_item, 256, 256); + 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() << m_item, 256, 256, true, true, &m_enabledPlugins); connect(job, SIGNAL(gotPreview(const KFileItem&, const QPixmap&)), this, SLOT(setPreviewPix(const KFileItem&, const QPixmap&))); |
