From 1e31fe896524513577911e382897b841e40a4814 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sat, 7 Sep 2019 22:08:54 +0000 Subject: removed foreach macro git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9067 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/general.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/qmmpui/general.cpp') diff --git a/src/qmmpui/general.cpp b/src/qmmpui/general.cpp index a09a9cd72..0b540ba34 100644 --- a/src/qmmpui/general.cpp +++ b/src/qmmpui/general.cpp @@ -37,7 +37,7 @@ void General::loadPlugins() m_cache = new QList; QSettings settings (Qmmp::configFile(), QSettings::IniFormat); - foreach (QString filePath, Qmmp::findPlugins("General")) + for(const QString &filePath : Qmmp::findPlugins("General")) { QmmpUiPluginCache *item = new QmmpUiPluginCache(filePath, &settings); if(item->hasError()) @@ -58,7 +58,7 @@ void General::create(QObject *parent) m_generals = new QHash (); m_parent = parent; loadPlugins(); - foreach(QmmpUiPluginCache* item, *m_cache) + for(QmmpUiPluginCache* item : qAsConst(*m_cache)) { if(!m_enabledNames.contains(item->shortName())) continue; @@ -75,7 +75,7 @@ QList General::factories() { loadPlugins(); QList list; - foreach (QmmpUiPluginCache *item, *m_cache) + for(QmmpUiPluginCache *item : qAsConst(*m_cache)) { if(item->generalFactory()) list.append(item->generalFactory()); @@ -87,7 +87,7 @@ QList General::enabledFactories() { loadPlugins(); QList list; - foreach (QmmpUiPluginCache *item, *m_cache) + for(QmmpUiPluginCache *item : qAsConst(*m_cache)) { if(!m_enabledNames.contains(item->shortName())) continue; @@ -100,7 +100,7 @@ QList General::enabledFactories() QString General::file(const GeneralFactory *factory) { loadPlugins(); - foreach(QmmpUiPluginCache *item, *m_cache) + for(const QmmpUiPluginCache *item : qAsConst(*m_cache)) { if(item->shortName() == factory->properties().shortName) return item->file(); -- cgit v1.2.3-13-gbd6f