diff --git a/plasma/applet.cpp b/plasma/applet.cpp index 5d4c0115..5e0cd924 100644 --- a/plasma/applet.cpp +++ b/plasma/applet.cpp @@ -1363,12 +1363,12 @@ QList Applet::contextualActions() return d->script ? d->script->contextualActions() : QList(); } -QAction *Applet::action(QString name) const +QAction *Applet::action(const QString &name) const { return d->actions->action(name); } -void Applet::addAction(QString name, QAction *action) +void Applet::addAction(const QString &name, QAction *action) { d->actions->addAction(name, action); } diff --git a/plasma/applet.h b/plasma/applet.h index d4ea2df1..4d19fc4b 100644 --- a/plasma/applet.h +++ b/plasma/applet.h @@ -482,12 +482,12 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget /** * Returns the QAction with the given name from our collection */ - Q_INVOKABLE QAction *action(QString name) const; + Q_INVOKABLE QAction *action(const QString &name) const; /** * Adds the action to our collection under the given name */ - void addAction(QString name, QAction *action); + void addAction(const QString &name, QAction *action); /** * Sets the BackgroundHints for this applet @see BackgroundHint