diff options
Diffstat (limited to 'src/frontend/profile/cprofilemgr.cpp')
-rw-r--r-- | src/frontend/profile/cprofilemgr.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/frontend/profile/cprofilemgr.cpp b/src/frontend/profile/cprofilemgr.cpp index 99e7823..4b8bcc3 100644 --- a/src/frontend/profile/cprofilemgr.cpp +++ b/src/frontend/profile/cprofilemgr.cpp @@ -42,11 +42,6 @@ CProfileMgr::~CProfileMgr() { delete m_startupProfile; } -/** Returns a list of available profiles. */ -const QList<CProfile*>& CProfileMgr::profiles() { - return m_profiles; -} - /** Creates a new profile with the name "name" (first parameter). @return The profile object */ CProfile *CProfileMgr::create(const QString &name) { CProfile* p = new CProfile(QString::null, name); @@ -84,15 +79,11 @@ bool CProfileMgr::remove( const QString& profile) { } /** Returns the profile with the desired name. If there's no such profile 0 is returned. */ -CProfile* CProfileMgr::profile(const QString& name) { - QListIterator<CProfile*> it(m_profiles); - while (it.hasNext()) { - CProfile* p = it.next(); - if (p && p->name() == name) { +CProfile * CProfileMgr::profile(const QString & name) const { + Q_FOREACH (CProfile * const p, m_profiles) { + if (p && p->name() == name) return p; - } } - return 0; } |