From 0814346bfe0354c680d2c597cc4e2042349bdf54 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Sat, 11 Apr 2009 11:20:13 +0000 Subject: [PATCH] const & for foreach svn path=/trunk/KDE/kdebase/apps/konsole/; revision=952188 --- src/ManageProfilesDialog.cpp | 6 +++--- src/SessionManager.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ManageProfilesDialog.cpp b/src/ManageProfilesDialog.cpp index c972fd23c..27832bd11 100644 --- a/src/ManageProfilesDialog.cpp +++ b/src/ManageProfilesDialog.cpp @@ -199,7 +199,7 @@ void ManageProfilesDialog::populateTable() _sessionModel->setHorizontalHeaderLabels( QStringList() << i18n("Name") << i18n("Show in Menu") << i18n("Shortcut") ); - foreach(const Profile::Ptr info,SessionManager::instance()->loadedProfiles()) + foreach(const Profile::Ptr &info,SessionManager::instance()->loadedProfiles()) { addItems(info); } @@ -256,7 +256,7 @@ void ManageProfilesDialog::tableSelectionChanged(const QItemSelection&) } void ManageProfilesDialog::deleteSelected() { - foreach(Profile::Ptr profile, selectedProfiles()) + foreach(const Profile::Ptr &profile, selectedProfiles()) { if (profile != SessionManager::instance()->defaultProfile()) SessionManager::instance()->deleteProfile(profile); @@ -306,7 +306,7 @@ void ManageProfilesDialog::editSelected() EditProfileDialog dialog(this); // the dialog will delete the profile group when it is destroyed ProfileGroup* group = new ProfileGroup; - foreach(Profile::Ptr profile,selectedProfiles()) + foreach(const Profile::Ptr &profile,selectedProfiles()) group->addProfile(profile); group->updateValues(); diff --git a/src/SessionManager.cpp b/src/SessionManager.cpp index 6ea354d6f..0edf0edd8 100644 --- a/src/SessionManager.cpp +++ b/src/SessionManager.cpp @@ -345,7 +345,7 @@ void SessionManager::changeProfile(Profile::Ptr info , ProfileGroup::Ptr group = info->asGroup(); if (group) { - foreach(Profile::Ptr profile, group->profiles()) + foreach(const Profile::Ptr &profile, group->profiles()) changeProfile(profile,propertyMap,persistant); return; }