replace name, pluginName and icon with pluginInfo()

add ContainmentAction::pluginInfo()
This commit is contained in:
Marco Martin 2013-02-25 14:49:42 +01:00
parent f00987658b
commit c3a536a7a4
3 changed files with 10 additions and 43 deletions

View File

@ -551,7 +551,7 @@ void Containment::addContainmentActions(const QString &trigger, const QString &p
if (containmentActions().contains(trigger)) {
plugin = containmentActions().value(trigger);
if (plugin->pluginName() != pluginName) {
if (plugin->pluginInfo().pluginName() != pluginName) {
containmentActions().remove(trigger);
delete plugin;
plugin = 0;

View File

@ -66,6 +66,11 @@ ContainmentActions::~ContainmentActions()
delete d;
}
KPluginInfo ContainmentActions::pluginInfo() const
{
return d->containmentActionsDescription;
}
Containment *ContainmentActions::containment()
{
if (d->containment) {
@ -74,33 +79,6 @@ Containment *ContainmentActions::containment()
return qobject_cast<Containment*>(parent());
}
QString ContainmentActions::name() const
{
if (!d->containmentActionsDescription.isValid()) {
return i18n("Unknown ContainmentActions");
}
return d->containmentActionsDescription.name();
}
QString ContainmentActions::icon() const
{
if (!d->containmentActionsDescription.isValid()) {
return QString();
}
return d->containmentActionsDescription.icon();
}
QString ContainmentActions::pluginName() const
{
if (!d->containmentActionsDescription.isValid()) {
return QString();
}
return d->containmentActionsDescription.pluginName();
}
void ContainmentActions::setSource(ContainmentActionsSource source)
{
d->containmentActionsSource = source;

View File

@ -76,22 +76,11 @@ class PLASMA_EXPORT ContainmentActions : public QObject
~ContainmentActions();
/**
* Returns the user-visible name for the containmentactions, as specified in the
* .desktop file.
*
* @return the user-visible name for the containmentactions.
**/
QString name() const;
/**
* Returns the plugin name for the containmentactions
* @return the plugin info for this ContainmentActions instance,
* including name, pluginName and icon
* @since 5.0
*/
QString pluginName() const;
/**
* Returns the icon related to this containmentactions
**/
QString icon() const;
KPluginInfo pluginInfo() const;
/**
* Returns the configurations of this containmentactions