Deprecate PluginLoader::listEngineInfoByCategory

It isn't used anywhere.

It is problematic since it returns KPluginInfo. Instead one can use the
KPluginMetaData-based method and do the filtering manually
This commit is contained in:
Nicolas Fella 2021-03-28 22:24:20 +02:00
parent f54f769d12
commit cde7f8a986
3 changed files with 7 additions and 1 deletions

View File

@ -83,7 +83,7 @@ ecm_generate_export_header(KF5Plasma
GROUP_BASE_NAME KF GROUP_BASE_NAME KF
VERSION ${KF_VERSION} VERSION ${KF_VERSION}
DEPRECATED_BASE_VERSION 0 DEPRECATED_BASE_VERSION 0
DEPRECATION_VERSIONS 5.6 5.19 5.28 5.30 5.36 5.46 5.67 5.77 5.78 DEPRECATION_VERSIONS 5.6 5.19 5.28 5.30 5.36 5.46 5.67 5.77 5.78 5.81
) )
# TODO: add support for EXCLUDE_DEPRECATED_BEFORE_AND_AT to all Plasma libs # TODO: add support for EXCLUDE_DEPRECATED_BEFORE_AND_AT to all Plasma libs
# needs fixing of undeprecated API being still implemented using own deprecated API # needs fixing of undeprecated API being still implemented using own deprecated API

View File

@ -277,6 +277,7 @@ KPluginInfo::List PluginLoader::listEngineInfo(const QString &parentApp)
} }
#endif #endif
#if PLASMA_BUILD_DEPRECATED_SINCE(5, 81)
KPluginInfo::List PluginLoader::listEngineInfoByCategory(const QString &category, const QString &parentApp) KPluginInfo::List PluginLoader::listEngineInfoByCategory(const QString &category, const QString &parentApp)
{ {
KPluginInfo::List list; KPluginInfo::List list;
@ -304,6 +305,7 @@ KPluginInfo::List PluginLoader::listEngineInfoByCategory(const QString &category
return list; return list;
} }
#endif
Service *PluginLoader::loadService(const QString &name, const QVariantList &args, QObject *parent) Service *PluginLoader::loadService(const QString &name, const QVariantList &args, QObject *parent)
{ {

View File

@ -86,6 +86,7 @@ public:
static KPluginInfo::List listEngineInfo(const QString &parentApp = QString()); static KPluginInfo::List listEngineInfo(const QString &parentApp = QString());
#endif #endif
#if PLASMA_ENABLE_DEPRECATED_SINCE(5, 81)
/** /**
* Returns a list of all known dataengines filtering by category. * Returns a list of all known dataengines filtering by category.
* *
@ -99,9 +100,12 @@ public:
* The default value of QString() will result in a * The default value of QString() will result in a
* list of all dataengines in specified categories. * list of all dataengines in specified categories.
* @return list of dataengines * @return list of dataengines
* @deprecated since 5.81, use listDataEngineMetaData() instead.
* @since 4.3 * @since 4.3
**/ **/
PLASMA_DEPRECATED_VERSION(5, 81, "Use listDataEngineMetaData instead")
static KPluginInfo::List listEngineInfoByCategory(const QString &category, const QString &parentApp = QString()); static KPluginInfo::List listEngineInfoByCategory(const QString &category, const QString &parentApp = QString());
#endif
/** /**
* Load a Service plugin. * Load a Service plugin.