From 833951fbc3447f6a48488c7843595cb74a48d79a Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sun, 30 Jul 2023 09:31:17 +0300 Subject: [PATCH] kutils: remove unused KPluginSelector methods no application installs kpart plugins either Signed-off-by: Ivailo Monev --- kutils/kpluginselector.cpp | 32 --------------------------- kutils/kpluginselector.h | 44 -------------------------------------- 2 files changed, 76 deletions(-) diff --git a/kutils/kpluginselector.cpp b/kutils/kpluginselector.cpp index a546d118..990eea8d 100644 --- a/kutils/kpluginselector.cpp +++ b/kutils/kpluginselector.cpp @@ -290,38 +290,6 @@ KPluginSelector::~KPluginSelector() delete d; } -void KPluginSelector::addPlugins(const QString &componentName, - const QString &categoryName, - const QString &categoryKey, - KSharedConfig::Ptr config) -{ - QStringList desktopFileNames = KGlobal::dirs()->findAllResources("data", - componentName + "/kpartplugins/*.desktop", KStandardDirs::Recursive); - - QList pluginInfoList = KPluginInfo::fromFiles(desktopFileNames); - - if (pluginInfoList.isEmpty()) - return; - - Q_ASSERT(config); - if (!config) - config = KSharedConfig::openConfig(componentName); - - KConfigGroup cfgGroup(config, "KParts Plugins"); - kDebug( 702 ) << "cfgGroup = " << &cfgGroup; - - d->pluginModel->addPlugins(pluginInfoList, categoryName, categoryKey, cfgGroup); - d->proxyModel->sort(0); -} - -void KPluginSelector::addPlugins(const KComponentData &instance, - const QString &categoryName, - const QString &categoryKey, - const KSharedConfig::Ptr &config) -{ - addPlugins(instance.componentName(), categoryName, categoryKey, config); -} - void KPluginSelector::addPlugins(const QList &pluginInfoList, PluginLoadMethod pluginLoadMethod, const QString &categoryName, diff --git a/kutils/kpluginselector.h b/kutils/kpluginselector.h index 868e6af1..a1658900 100644 --- a/kutils/kpluginselector.h +++ b/kutils/kpluginselector.h @@ -74,50 +74,6 @@ public: */ ~KPluginSelector(); - /** - * Add a list of KParts plugins - * - * The information about the plugins will be loaded from the - * share/<instancename>/kpartplugins directory - * - * @param componentName The name of the KComponentData of the plugin's parent. - * @param categoryName The translated name of the category. This is the - * name that is shown in the title. If the category - * did exist before because of another call to - * addPlugins, then they will be shown in that - * category. If @p categoryName is a new one, then - * a new category will be shown on the plugin window, - * and the list of plugins added to it - * @param categoryKey When you have different categories of KParts - * plugins you distinguish between the plugins using - * the Category key in the .desktop file. Use this - * parameter to select only those KParts plugins - * with the Category key == @p categoryKey. If - * @p categoryKey is not set the Category key is - * ignored and all plugins are shown. Not match case - * @param config The KConfig object that holds the state of the - * plugins being enabled or not. By default it should - * be componentData.config(). It is recommended to - * always pass a KConfig object if you use - * KSettings::PluginPage since you never know from where the - * page will be called (think global config app). - * For example KViewCanvas passes KConfig( - * "kviewcanvas" ) - */ - void addPlugins(const QString &componentName, - const QString &categoryName = QString(), - const QString &categoryKey = QString(), - KSharedConfig::Ptr config = KSharedConfig::Ptr()); - - /** - * Add a list of KParts plugins. Convenience method for the one above. - * If not set explicitly, @p config is set to componentData.config() - */ - void addPlugins(const KComponentData &instance, - const QString &categoryName = QString(), - const QString &categoryKey = QString(), - const KSharedConfig::Ptr &config = KSharedConfig::Ptr()); - /** * Add a list of non-KParts plugins *