diff options
Diffstat (limited to 'qmake/library/qmakeevaluator.cpp')
-rw-r--r-- | qmake/library/qmakeevaluator.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index 51e26f343b..e3b20771d4 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -272,7 +272,7 @@ void QMakeEvaluator::skipHashStr(const ushort *&tokPtr) // FIXME: this should not build new strings for direct sections. // Note that the E_SPRINTF and E_LIST implementations rely on the deep copy. -ProStringList QMakeEvaluator::split_value_list(const QStringRef &vals, int source) +ProStringList QMakeEvaluator::split_value_list(QStringView vals, int source) { QString build; ProStringList ret; @@ -653,7 +653,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProBlock( evalError(fL1S("Conditional must expand to exactly one word.")); okey = false; } else { - okey = isActiveConfig(curr.at(0).toQStringRef(), true); + okey = isActiveConfig(curr.at(0).toQStringView(), true); traceMsg("condition %s is %s", dbgStr(curr.at(0)), dbgBool(okey)); okey ^= invert; } @@ -780,7 +780,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProLoop( } infinite = true; } else { - const QStringRef &itl = it_list.toQStringRef(); + QStringView itl = it_list.toQStringView(); int dotdot = itl.indexOf(statics.strDotDot); if (dotdot != -1) { bool ok; @@ -877,7 +877,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProVariable( ProStringList varVal; if (expandVariableReferences(tokPtr, sizeHint, &varVal, true) == ReturnError) return ReturnError; - const QStringRef &val = varVal.at(0).toQStringRef(); + QStringView val = varVal.at(0).toQStringView(); if (val.length() < 4 || val.at(0) != QLatin1Char('s')) { evalError(fL1S("The ~= operator can handle only the s/// function.")); return ReturnTrue; @@ -1315,7 +1315,7 @@ void QMakeEvaluator::setupProject() void QMakeEvaluator::evaluateCommand(const QString &cmds, const QString &where) { if (!cmds.isEmpty()) { - ProFile *pro = m_parser->parsedProBlock(QStringRef(&cmds), 0, where, -1); + ProFile *pro = m_parser->parsedProBlock(QStringView(cmds), 0, where, -1); if (pro->isOk()) { m_locationStack.push(m_current); visitProBlock(pro, pro->tokPtr()); @@ -1624,7 +1624,7 @@ QString QMakeEvaluator::currentDirectory() const return QString(); } -bool QMakeEvaluator::isActiveConfig(const QStringRef &config, bool regex) +bool QMakeEvaluator::isActiveConfig(QStringView config, bool regex) { // magic types for easy flipping if (config == statics.strtrue) @@ -1820,7 +1820,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateExpandFunction( } QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditional( - const QStringRef &cond, const QString &where, int line) + QStringView cond, const QString &where, int line) { VisitReturn ret = ReturnFalse; ProFile *pro = m_parser->parsedProBlock(cond, 0, where, line, QMakeParser::TestGrammar); @@ -1838,7 +1838,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::checkRequirements(const ProStringLis { ProStringList &failed = valuesRef(ProKey("QMAKE_FAILED_REQUIREMENTS")); for (const ProString &dep : deps) { - VisitReturn vr = evaluateConditional(dep.toQStringRef(), m_current.pro->fileName(), m_current.line); + VisitReturn vr = evaluateConditional(dep.toQStringView(), m_current.pro->fileName(), m_current.line); if (vr == ReturnError) return ReturnError; if (vr != ReturnTrue) @@ -2004,7 +2004,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFeatureFile( int start_root = 0; const QStringList &paths = m_featureRoots->paths; if (!currFn.isEmpty()) { - QStringRef currPath = IoUtils::pathName(currFn); + QStringView currPath = IoUtils::pathName(currFn); for (int root = 0; root < paths.size(); ++root) if (currPath == paths.at(root)) { start_root = root + 1; |