diff options
author | Ivan Komissarov <ABBAPOH@gmail.com> | 2022-08-20 17:09:10 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2022-08-23 20:29:46 +0000 |
commit | bbd699f2601a5f04d5f83effb5775a9543ea0ea7 (patch) | |
tree | 71790c4f20946af8fa7cacb82c76569a6f2db85f | |
parent | 7ac5675cf6d1e9f20f115bc5b1f66fb64f46d087 (diff) | |
download | qbs-bbd699f2601a5f04d5f83effb5775a9543ea0ea7.tar.gz |
clang-tidy: fix 'modernize-loop-convert' error
Change-Id: Ia47ad4ed3e6d3f5067e8b32268185092f38c26c0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | src/app/config/configcommandlineparser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/app/config/configcommandlineparser.cpp b/src/app/config/configcommandlineparser.cpp index f4d0a142f..173676d6d 100644 --- a/src/app/config/configcommandlineparser.cpp +++ b/src/app/config/configcommandlineparser.cpp @@ -126,8 +126,8 @@ void ConfigCommandLineParser::parse(const QStringList &commandLine) throw Error(Tr::tr("Profile properties must be provided.")); if (m_command.varNames.size() % 2 != 0) throw Error(Tr::tr("Profile properties must be key/value pairs.")); - for (int i = 0; i < m_command.varNames.size(); ++i) { - if (m_command.varNames.at(i).isEmpty()) + for (const auto &varName : qAsConst(m_command.varNames)) { + if (varName.isEmpty()) throw Error(Tr::tr("Property names must not be empty.")); } break; |