diff options
Diffstat (limited to 'qmake/library/qmakeglobals.cpp')
-rw-r--r-- | qmake/library/qmakeglobals.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/qmake/library/qmakeglobals.cpp b/qmake/library/qmakeglobals.cpp index 34c443b50e..e05d33c7c9 100644 --- a/qmake/library/qmakeglobals.cpp +++ b/qmake/library/qmakeglobals.cpp @@ -89,7 +89,7 @@ QMakeGlobals::ArgumentReturn QMakeGlobals::addCommandLineArguments( QMakeCmdLineParserState &state, QStringList &args, int *pos) { enum { ArgNone, ArgConfig, ArgSpec, ArgXSpec, ArgTmpl, ArgTmplPfx, ArgCache, ArgQtConf } argState = ArgNone; - for (; *pos < args.count(); (*pos)++) { + for (; *pos < args.size(); (*pos)++) { QString arg = args.at(*pos); switch (argState) { case ArgConfig: @@ -168,7 +168,7 @@ void QMakeGlobals::commitCommandLineArguments(QMakeCmdLineParserState &state) { if (!state.extraargs.isEmpty()) { QString extra = fL1S("QMAKE_EXTRA_ARGS ="); - for (const QString &ea : qAsConst(state.extraargs)) + for (const QString &ea : std::as_const(state.extraargs)) extra += QLatin1Char(' ') + QMakeEvaluator::quoteValue(ProString(ea)); state.cmds[QMakeEvalBefore] << extra; } @@ -213,8 +213,8 @@ void QMakeGlobals::setDirectories(const QString &input_dir, const QString &outpu QString dstpath = output_dir; if (!dstpath.endsWith(QLatin1Char('/'))) dstpath += QLatin1Char('/'); - int srcLen = srcpath.length(); - int dstLen = dstpath.length(); + int srcLen = srcpath.size(); + int dstLen = dstpath.size(); int lastSl = -1; while (++lastSl, --srcLen, --dstLen, srcLen && dstLen && srcpath.at(srcLen) == dstpath.at(dstLen)) @@ -230,9 +230,9 @@ QString QMakeGlobals::shadowedPath(const QString &fileName) const if (source_root.isEmpty()) return fileName; if (fileName.startsWith(source_root) - && (fileName.length() == source_root.length() - || fileName.at(source_root.length()) == QLatin1Char('/'))) { - return build_root + fileName.mid(source_root.length()); + && (fileName.size() == source_root.size() + || fileName.at(source_root.size()) == QLatin1Char('/'))) { + return build_root + fileName.mid(source_root.size()); } return QString(); } @@ -243,7 +243,7 @@ QStringList QMakeGlobals::splitPathList(const QString &val) const if (!val.isEmpty()) { QString cwd(QDir::currentPath()); const QStringList vals = val.split(dirlist_sep, Qt::SkipEmptyParts); - ret.reserve(vals.length()); + ret.reserve(vals.size()); for (const QString &it : vals) ret << IoUtils::resolvePath(cwd, it); } @@ -272,7 +272,7 @@ QString QMakeGlobals::expandEnvVars(const QString &str) const startIndex = string.indexOf(QLatin1Char('$'), startIndex); if (startIndex < 0) break; - if (string.length() < startIndex + 3) + if (string.size() < startIndex + 3) break; if (string.at(startIndex + 1) != QLatin1Char('(')) { startIndex++; @@ -283,7 +283,7 @@ QString QMakeGlobals::expandEnvVars(const QString &str) const break; QString value = getEnv(string.mid(startIndex + 2, endIndex - startIndex - 2)); string.replace(startIndex, endIndex - startIndex + 1, value); - startIndex += value.length(); + startIndex += value.size(); } return string; } |