kutils: remove unused KPluginSelector methods

no application installs kpart plugins either

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-07-30 09:31:17 +03:00
parent 1dc39b0b86
commit 833951fbc3
2 changed files with 0 additions and 76 deletions

View file

@ -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<KPluginInfo> 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<KPluginInfo> &pluginInfoList,
PluginLoadMethod pluginLoadMethod,
const QString &categoryName,

View file

@ -74,50 +74,6 @@ public:
*/
~KPluginSelector();
/**
* Add a list of KParts plugins
*
* The information about the plugins will be loaded from the
* share/&lt;instancename&gt;/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
*