aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/commandlinemanager.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/commandlinemanager.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/commandlinemanager.cpp')
-rw-r--r--src/qmmpui/commandlinemanager.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qmmpui/commandlinemanager.cpp b/src/qmmpui/commandlinemanager.cpp
index ed3c774a7..684231144 100644
--- a/src/qmmpui/commandlinemanager.cpp
+++ b/src/qmmpui/commandlinemanager.cpp
@@ -42,7 +42,7 @@ void CommandLineManager::checkOptions()
m_options = new QList<CommandLineHandler *>;
m_files = new QHash<CommandLineHandler*, QString>;
- foreach (QString filePath, Qmmp::findPlugins("CommandLineOptions"))
+ for(const QString &filePath : Qmmp::findPlugins("CommandLineOptions"))
{
QPluginLoader loader(filePath);
QObject *plugin = loader.instance();
@@ -76,7 +76,7 @@ QString CommandLineManager::executeCommand(const QString &name, const QStringLis
checkOptions();
bool started = UiHelper::instance() && SoundCore::instance() && MediaPlayer::instance();
- foreach(CommandLineHandler *opt, *m_options)
+ for(CommandLineHandler *opt : qAsConst(*m_options))
{
int id = opt->identify(name);
if(id < 0)
@@ -100,7 +100,7 @@ bool CommandLineManager::hasOption(const QString &opt_str, CommandLineHandler::O
checkOptions();
if(flags)
*flags = nullptr;
- foreach(CommandLineHandler *opt, *m_options)
+ for(const CommandLineHandler *opt : qAsConst(*m_options))
{
int id = opt->identify(opt_str);
if(id >= 0)
@@ -116,9 +116,9 @@ bool CommandLineManager::hasOption(const QString &opt_str, CommandLineHandler::O
void CommandLineManager::printUsage()
{
checkOptions();
- foreach(CommandLineHandler *opt, *m_options)
+ for(const CommandLineHandler *opt : qAsConst(*m_options))
{
- foreach(QString line, opt->helpString())
+ for(const QString &line : opt->helpString())
{
QString str = formatHelpString(line);
if(!str.isEmpty())