aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/general.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-09-07 22:08:54 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-09-07 22:08:54 +0000
commit1e31fe896524513577911e382897b841e40a4814 (patch)
tree153483337dcab82e0bc32cc19f7876a7eb9593c7 /src/qmmpui/general.cpp
parent1d6f69e20769d902a70001277199129361d0a761 (diff)
downloadqmmp-1e31fe896524513577911e382897b841e40a4814.tar.gz
qmmp-1e31fe896524513577911e382897b841e40a4814.tar.bz2
qmmp-1e31fe896524513577911e382897b841e40a4814.zip
removed foreach macro
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9067 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/general.cpp')
-rw-r--r--src/qmmpui/general.cpp10
1 files changed, 5 insertions, 5 deletions
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<QmmpUiPluginCache*>;
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 <GeneralFactory*, QObject*>();
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<GeneralFactory *> General::factories()
{
loadPlugins();
QList<GeneralFactory *> list;
- foreach (QmmpUiPluginCache *item, *m_cache)
+ for(QmmpUiPluginCache *item : qAsConst(*m_cache))
{
if(item->generalFactory())
list.append(item->generalFactory());
@@ -87,7 +87,7 @@ QList<GeneralFactory *> General::enabledFactories()
{
loadPlugins();
QList<GeneralFactory *> list;
- foreach (QmmpUiPluginCache *item, *m_cache)
+ for(QmmpUiPluginCache *item : qAsConst(*m_cache))
{
if(!m_enabledNames.contains(item->shortName()))
continue;
@@ -100,7 +100,7 @@ QList<GeneralFactory *> 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();