diff --git a/src/plasma/containment.cpp b/src/plasma/containment.cpp index 37990b5be..2085e9c0d 100644 --- a/src/plasma/containment.cpp +++ b/src/plasma/containment.cpp @@ -187,7 +187,7 @@ void Containment::restore(KConfigGroup &group) } } else { //shell defaults //steal the data directly, for efficiency - QHash defaults = corona()->containmentActionsDefaults(d->type); + QHash defaults = corona()->defaultContainmentActionsPlugins(d->type); for (QHash::const_iterator it = defaults.constBegin(), end = defaults.constEnd(); it != end; ++it) { addContainmentActions(it.key(), it.value()); diff --git a/src/plasma/corona.cpp b/src/plasma/corona.cpp index 0e02f81bc..96f0ef04c 100644 --- a/src/plasma/corona.cpp +++ b/src/plasma/corona.cpp @@ -388,18 +388,9 @@ void Corona::addShortcuts(KActionCollection *newShortcuts) } } -void Corona::setContainmentActionsDefault(Plasma::ContainmentType containmentType, QEvent *trigger, const QString &name) -{ - d->containmentActionsDefaults[containmentType].insert(ContainmentActions::eventToString(trigger), name); -} - -QString Corona::containmentActionsDefault(Plasma::ContainmentType containmentType, QEvent *trigger) const -{ - return d->containmentActionsDefaults.value(containmentType).value(ContainmentActions::eventToString(trigger)); -} - -QHash Corona::containmentActionsDefaults(ContainmentType containmentType) const +QHash Corona::defaultContainmentActionsPlugins(ContainmentType containmentType) const { + //FIXME: need to read these out of the package return d->containmentActionsDefaults.value(containmentType); } diff --git a/src/plasma/corona.h b/src/plasma/corona.h index 00351ced1..5ee3a5913 100644 --- a/src/plasma/corona.h +++ b/src/plasma/corona.h @@ -187,21 +187,12 @@ public: /** * @since 5.0 - * Sets the default containmentactions plugins for the given containment type + * Returns the default containmentactions plugins for the given containment type. + * + * @arg containmentType the type of containment these actions apply to + * @return a hash containing the triggers and the plugin names associated with them */ - void setContainmentActionsDefault(Plasma::ContainmentType containmentType, QEvent *trigger, const QString &name); - - /** - * @since 5.0 - * Returns the default containmentactions plugins for the given containment type - */ - QString containmentActionsDefault(ContainmentType containmentType, QEvent *trigger) const; - - /** - * @since 5.0 - * Returns the default containmentactions plugins for the given containment type - */ - QHash containmentActionsDefaults(ContainmentType containmentType) const; + QHash defaultContainmentActionsPlugins(ContainmentType containmentType) const; /** * @param the AbstractDialogManager implementation