[pluginloader] Deprecate listContainments and listContainmentsOfType
They are based on the deprecated KPluginInfo and unused.
This commit is contained in:
parent
43e4a16152
commit
e9ef688387
@ -52,9 +52,11 @@ void PluginTest::listContainmentActions()
|
|||||||
|
|
||||||
void PluginTest::listContainmentsOfType()
|
void PluginTest::listContainmentsOfType()
|
||||||
{
|
{
|
||||||
|
#if PLASMA_BUILD_DEPRECATED_SINCE(5, 83)
|
||||||
const KPluginInfo::List plugins = Plasma::PluginLoader::listContainmentsOfType(QStringLiteral("Desktop"));
|
const KPluginInfo::List plugins = Plasma::PluginLoader::listContainmentsOfType(QStringLiteral("Desktop"));
|
||||||
qDebug() << "Desktop Containments: " << plugins.count();
|
qDebug() << "Desktop Containments: " << plugins.count();
|
||||||
QVERIFY(plugins.count() > 0 || m_buildonly);
|
QVERIFY(plugins.count() > 0 || m_buildonly);
|
||||||
|
#endif
|
||||||
|
|
||||||
const QList<KPluginMetaData> pluginsMetaData = Plasma::PluginLoader::listContainmentsMetaDataOfType(QStringLiteral("Desktop"));
|
const QList<KPluginMetaData> pluginsMetaData = Plasma::PluginLoader::listContainmentsMetaDataOfType(QStringLiteral("Desktop"));
|
||||||
qDebug() << "Desktop Containments MetaData: " << pluginsMetaData.count();
|
qDebug() << "Desktop Containments MetaData: " << pluginsMetaData.count();
|
||||||
|
@ -657,10 +657,12 @@ QString PluginLoader::appletCategory(const QString &appletName)
|
|||||||
return p.metadata().category();
|
return p.metadata().category();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if PLASMA_BUILD_DEPRECATED_SINCE(5, 83)
|
||||||
KPluginInfo::List PluginLoader::listContainments(const QString &category, const QString &parentApp)
|
KPluginInfo::List PluginLoader::listContainments(const QString &category, const QString &parentApp)
|
||||||
{
|
{
|
||||||
return listContainmentsOfType(QString(), category, parentApp);
|
return listContainmentsOfType(QString(), category, parentApp);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QList<KPluginMetaData> PluginLoader::listContainmentsMetaData(std::function<bool(const KPluginMetaData &)> filter)
|
QList<KPluginMetaData> PluginLoader::listContainmentsMetaData(std::function<bool(const KPluginMetaData &)> filter)
|
||||||
{
|
{
|
||||||
@ -684,6 +686,7 @@ QList<KPluginMetaData> PluginLoader::listContainmentsMetaDataOfType(const QStrin
|
|||||||
return listContainmentsMetaData(filter);
|
return listContainmentsMetaData(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if PLASMA_BUILD_DEPRECATED_SINCE(5, 83)
|
||||||
KPluginInfo::List PluginLoader::listContainmentsOfType(const QString &type, const QString &category, const QString &parentApp)
|
KPluginInfo::List PluginLoader::listContainmentsOfType(const QString &type, const QString &category, const QString &parentApp)
|
||||||
{
|
{
|
||||||
KConfigGroup group(KSharedConfig::openConfig(), "General");
|
KConfigGroup group(KSharedConfig::openConfig(), "General");
|
||||||
@ -708,6 +711,7 @@ KPluginInfo::List PluginLoader::listContainmentsOfType(const QString &type, cons
|
|||||||
|
|
||||||
return KPluginInfo::fromMetaData(KPackage::PackageLoader::self()->findPackages(QStringLiteral("Plasma/Applet"), QString(), filter).toVector());
|
return KPluginInfo::fromMetaData(KPackage::PackageLoader::self()->findPackages(QStringLiteral("Plasma/Applet"), QString(), filter).toVector());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if PLASMA_BUILD_DEPRECATED_SINCE(5, 83)
|
#if PLASMA_BUILD_DEPRECATED_SINCE(5, 83)
|
||||||
KPluginInfo::List PluginLoader::listContainmentsForMimeType(const QString &mimeType)
|
KPluginInfo::List PluginLoader::listContainmentsForMimeType(const QString &mimeType)
|
||||||
|
@ -263,6 +263,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
QString appletCategory(const QString &appletName);
|
QString appletCategory(const QString &appletName);
|
||||||
|
|
||||||
|
#if PLASMA_ENABLE_DEPRECATED_SINCE(5, 83)
|
||||||
/**
|
/**
|
||||||
* Returns a list of all known containments.
|
* Returns a list of all known containments.
|
||||||
*
|
*
|
||||||
@ -276,9 +277,12 @@ public:
|
|||||||
* X-KDE-ParentApp entry (if any) in the plugin info.
|
* X-KDE-ParentApp entry (if any) in the plugin info.
|
||||||
* The default value of QString() will result in a
|
* The default value of QString() will result in a
|
||||||
* list of all containments.
|
* list of all containments.
|
||||||
|
* @deprecated since 5.83, use PluginLoader::listContainmentsMetaData
|
||||||
* @return list of containments
|
* @return list of containments
|
||||||
**/
|
**/
|
||||||
|
PLASMA_DEPRECATED_VERSION(5, 83, "Use PluginLoader::listContainmentsMetaData")
|
||||||
static KPluginInfo::List listContainments(const QString &category = QString(), const QString &parentApp = QString());
|
static KPluginInfo::List listContainments(const QString &category = QString(), const QString &parentApp = QString());
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all known containments.
|
* Returns a list of all known containments.
|
||||||
@ -298,6 +302,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
static QList<KPluginMetaData> listContainmentsMetaDataOfType(const QString &type);
|
static QList<KPluginMetaData> listContainmentsMetaDataOfType(const QString &type);
|
||||||
|
|
||||||
|
#if PLASMA_ENABLE_DEPRECATED_SINCE(5, 83)
|
||||||
/**
|
/**
|
||||||
* Returns a list of all known containments that match the parameters.
|
* Returns a list of all known containments that match the parameters.
|
||||||
*
|
*
|
||||||
@ -314,9 +319,12 @@ public:
|
|||||||
* X-KDE-ParentApp entry (if any) in the plugin info.
|
* X-KDE-ParentApp entry (if any) in the plugin info.
|
||||||
* The default value of QString() will result in a
|
* The default value of QString() will result in a
|
||||||
* list of all containments, matching categories/type.
|
* list of all containments, matching categories/type.
|
||||||
|
* @deprecated since 5.83, use PluginLoader::listContainmentsMetaDataOfType
|
||||||
* @return list of containments
|
* @return list of containments
|
||||||
**/
|
**/
|
||||||
|
PLASMA_DEPRECATED_VERSION(5, 83, "Use PluginLoader::listContainmentsMetaDataOfType")
|
||||||
static KPluginInfo::List listContainmentsOfType(const QString &type, const QString &category = QString(), const QString &parentApp = QString());
|
static KPluginInfo::List listContainmentsOfType(const QString &type, const QString &category = QString(), const QString &parentApp = QString());
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return a list of all known types of containments on this system
|
* @return a list of all known types of containments on this system
|
||||||
|
Loading…
x
Reference in New Issue
Block a user