const & for foreach 'iterators'

svn path=/trunk/KDE/kdebase/workspace/plasma/scriptengines/javascript/; revision=952187
This commit is contained in:
Albert Astals Cid 2009-04-11 11:11:50 +00:00
parent e24635dece
commit 5d0e70291b
2 changed files with 2 additions and 2 deletions

View File

@ -181,7 +181,7 @@ QList<QAction*> AppletInterface::contextualActions() const
QList<QAction*> actions;
Plasma::Applet *a = applet();
foreach (const QString name, m_actions) {
foreach (const QString &name, m_actions) {
QAction *action = a->action(name);
if (action) {

View File

@ -443,7 +443,7 @@ void SimpleJavaScriptApplet::setupObjects()
QScriptValue args = m_engine->newArray();
int i = 0;
foreach (QVariant arg, applet()->startupArguments()) {
foreach (const QVariant &arg, applet()->startupArguments()) {
args.setProperty(i, variantToScriptValue(arg));
++i;
}