]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/tooltips/tooltipmanager.cpp
Use only enabled preview plugins in InformationPanelContent and ToolTipManager.
[dolphin.git] / src / views / tooltips / tooltipmanager.cpp
index eaa78598732c12ba966181146535ad8e8e6939d4..4786445f1a98563214b1709e3123e79ffd800944 100644 (file)
@@ -1,21 +1,8 @@
-/*******************************************************************************
- *   Copyright (C) 2008 by Konstantin Heil <konst.heil@stud.uni-heidelberg.de> *
- *                                                                             *
- *   This program is free software; you can redistribute it and/or modify      *
- *   it under the terms of the GNU General Public License as published by      *
- *   the Free Software Foundation; either version 2 of the License, or         *
- *   (at your option) any later version.                                       *
- *                                                                             *
- *   This program is distributed in the hope that it will be useful,           *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of            *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             *
- *   GNU General Public License for more details.                              *
- *                                                                             *
- *   You should have received a copy of the GNU General Public License         *
- *   along with this program; if not, write to the                             *
- *   Free Software Foundation, Inc.,                                           *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA                *
- *******************************************************************************/
+/*
+ * SPDX-FileCopyrightText: 2008 Konstantin Heil <konst.heil@stud.uni-heidelberg.de>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
 
 #include "tooltipmanager.h"
 
@@ -23,7 +10,9 @@
 
 #include <KIO/JobUiDelegate>
 #include <KIO/PreviewJob>
+#include <KConfigGroup>
 #include <KJobWidgets>
+#include <KSharedConfig>
 #include <KToolTipWidget>
 #include <KIconLoader>
 
@@ -145,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);