move Applet::customCategories in PluginLoader
Applet::customCategories() -> PluginLoader::customAppletCategories() and PluginLoader::setCustomAppletCategories()
This commit is contained in:
parent
dfaaea7c1c
commit
be8b33758e
@ -931,16 +931,6 @@ bool Applet::hasValidAssociatedApplication() const
|
||||
return AssociatedApplicationManager::self()->appletHasValidAssociatedApplication(this);
|
||||
}
|
||||
|
||||
void Applet::setCustomCategories(const QStringList &categories)
|
||||
{
|
||||
AppletPrivate::s_customCategories = QSet<QString>::fromList(categories);
|
||||
}
|
||||
|
||||
QStringList Applet::customCategories() const
|
||||
{
|
||||
return AppletPrivate::s_customCategories.toList();
|
||||
}
|
||||
|
||||
Applet *Applet::loadPlasmoid(const QString &path, uint appletId, const QVariantList &args)
|
||||
{
|
||||
if (QFile::exists(path + "/metadata.desktop")) {
|
||||
|
@ -267,20 +267,6 @@ class PLASMA_EXPORT Applet : public QObject
|
||||
*/
|
||||
void setTitle(const QString &title) const;
|
||||
|
||||
/**
|
||||
* Sets the list of custom categories that are used in addition to the default
|
||||
* set of categories known to libplasma for Applets.
|
||||
* @param categories a list of categories
|
||||
* @since 4.3
|
||||
*/
|
||||
void setCustomCategories(const QStringList &categories);
|
||||
|
||||
/**
|
||||
* @return the list of custom categories known to libplasma
|
||||
* @since 4.3
|
||||
*/
|
||||
QStringList customCategories() const;
|
||||
|
||||
/**
|
||||
* Attempts to load an applet from a package
|
||||
*
|
||||
|
@ -499,6 +499,16 @@ QStringList PluginLoader::listAppletCategories(const QString &parentApp, bool vi
|
||||
return categories;
|
||||
}
|
||||
|
||||
void PluginLoader::setCustomAppletCategories(const QStringList &categories)
|
||||
{
|
||||
AppletPrivate::s_customCategories = QSet<QString>::fromList(categories);
|
||||
}
|
||||
|
||||
QStringList PluginLoader::customAppletCategories() const
|
||||
{
|
||||
return AppletPrivate::s_customCategories.toList();
|
||||
}
|
||||
|
||||
|
||||
KPluginInfo::List PluginLoader::listDataEngineInfo(const QString &parentApp)
|
||||
{
|
||||
|
@ -164,6 +164,20 @@ public:
|
||||
QStringList listAppletCategories(const QString &parentApp = QString(),
|
||||
bool visibleOnly = true);
|
||||
|
||||
/**
|
||||
* Sets the list of custom categories that are used in addition to the default
|
||||
* set of categories known to libplasma for Applets.
|
||||
* @param categories a list of categories
|
||||
* @since 4.3
|
||||
*/
|
||||
void setCustomAppletCategories(const QStringList &categories);
|
||||
|
||||
/**
|
||||
* @return the list of custom categories known to libplasma
|
||||
* @since 4.3
|
||||
*/
|
||||
QStringList customAppletCategories() const;
|
||||
|
||||
/**
|
||||
* Returns a list of all known DataEngines.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user