Applet::category(appletName) moved in PluginLoader
Applet::category(QString) -> PluginLoader::appletCategory(QString)
This commit is contained in:
parent
8cccff2b97
commit
4994f9e27a
@ -407,22 +407,6 @@ KPluginInfo Applet::pluginInfo() const
|
|||||||
return d->appletDescription;
|
return d->appletDescription;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Applet::category(const QString &appletName)
|
|
||||||
{
|
|
||||||
if (appletName.isEmpty()) {
|
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
|
|
||||||
const QString constraint = QString("[X-KDE-PluginInfo-Name] == '%1'").arg(appletName);
|
|
||||||
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
|
|
||||||
|
|
||||||
if (offers.isEmpty()) {
|
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
|
|
||||||
return offers.first()->property("X-KDE-PluginInfo-Category").toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
ImmutabilityType Applet::immutability() const
|
ImmutabilityType Applet::immutability() const
|
||||||
{
|
{
|
||||||
// if this object is itself system immutable, then just return that; it's the most
|
// if this object is itself system immutable, then just return that; it's the most
|
||||||
|
@ -284,12 +284,6 @@ class PLASMA_EXPORT Applet : public QObject
|
|||||||
static Applet *loadPlasmoid(const QString &path, uint appletId = 0,
|
static Applet *loadPlasmoid(const QString &path, uint appletId = 0,
|
||||||
const QVariantList &args = QVariantList());
|
const QVariantList &args = QVariantList());
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the category of the given applet
|
|
||||||
*
|
|
||||||
* @param appletName the name of the applet
|
|
||||||
*/
|
|
||||||
static QString category(const QString &appletName);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the icon related to this applet
|
* Returns the icon related to this applet
|
||||||
|
@ -509,6 +509,22 @@ QStringList PluginLoader::customAppletCategories() const
|
|||||||
return AppletPrivate::s_customCategories.toList();
|
return AppletPrivate::s_customCategories.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString PluginLoader::appletCategory(const QString& appletName)
|
||||||
|
{
|
||||||
|
if (appletName.isEmpty()) {
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString constraint = QString("[X-KDE-PluginInfo-Name] == '%1'").arg(appletName);
|
||||||
|
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Applet", constraint);
|
||||||
|
|
||||||
|
if (offers.isEmpty()) {
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
|
return offers.first()->property("X-KDE-PluginInfo-Category").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
KPluginInfo::List PluginLoader::listDataEngineInfo(const QString &parentApp)
|
KPluginInfo::List PluginLoader::listDataEngineInfo(const QString &parentApp)
|
||||||
{
|
{
|
||||||
|
@ -178,6 +178,13 @@ public:
|
|||||||
*/
|
*/
|
||||||
QStringList customAppletCategories() const;
|
QStringList customAppletCategories() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the category of the given applet
|
||||||
|
*
|
||||||
|
* @param appletName the name of the applet
|
||||||
|
*/
|
||||||
|
QString appletCategory(const QString &appletName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all known DataEngines.
|
* Returns a list of all known DataEngines.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user