remove pointless conversion to QString in isTrue()
Change-Id: I7766672018dd4acf9b9fb89acfe664671de4bc3d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
a7a3cd643a
commit
7931395d5b
@ -192,9 +192,8 @@ void QMakeEvaluator::initFunctionStatics()
|
|||||||
statics.functions.insert(ProKey(testInits[i].name), testInits[i].func);
|
statics.functions.insert(ProKey(testInits[i].name), testInits[i].func);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool isTrue(const ProString &_str, QString &tmp)
|
static bool isTrue(const ProString &str)
|
||||||
{
|
{
|
||||||
const QString &str = _str.toQString(tmp);
|
|
||||||
return !str.compare(statics.strtrue, Qt::CaseInsensitive) || str.toInt();
|
return !str.compare(statics.strtrue, Qt::CaseInsensitive) || str.toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -904,7 +903,7 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand(
|
|||||||
} else {
|
} else {
|
||||||
bool recursive = false;
|
bool recursive = false;
|
||||||
if (args.count() == 2)
|
if (args.count() == 2)
|
||||||
recursive = isTrue(args.at(1), m_tmp2);
|
recursive = isTrue(args.at(1));
|
||||||
QStringList dirs;
|
QStringList dirs;
|
||||||
QString r = m_option->expandEnvVars(args.at(0).toQString(m_tmp1))
|
QString r = m_option->expandEnvVars(args.at(0).toQString(m_tmp1))
|
||||||
.replace(QLatin1Char('\\'), QLatin1Char('/'));
|
.replace(QLatin1Char('\\'), QLatin1Char('/'));
|
||||||
@ -1403,7 +1402,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
|
|||||||
flags = LoadSilent;
|
flags = LoadSilent;
|
||||||
if (args.count() >= 2) {
|
if (args.count() >= 2) {
|
||||||
parseInto = args.at(1).toQString(m_tmp2);
|
parseInto = args.at(1).toQString(m_tmp2);
|
||||||
if (args.count() >= 3 && isTrue(args.at(2), m_tmp3))
|
if (args.count() >= 3 && isTrue(args.at(2)))
|
||||||
flags = LoadSilent;
|
flags = LoadSilent;
|
||||||
}
|
}
|
||||||
QString fn = resolvePath(m_option->expandEnvVars(args.at(0).toQString(m_tmp1)));
|
QString fn = resolvePath(m_option->expandEnvVars(args.at(0).toQString(m_tmp1)));
|
||||||
@ -1441,7 +1440,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
|
|||||||
case T_LOAD: {
|
case T_LOAD: {
|
||||||
bool ignore_error = false;
|
bool ignore_error = false;
|
||||||
if (args.count() == 2) {
|
if (args.count() == 2) {
|
||||||
ignore_error = isTrue(args.at(1), m_tmp2);
|
ignore_error = isTrue(args.at(1));
|
||||||
} else if (args.count() != 1) {
|
} else if (args.count() != 1) {
|
||||||
evalError(fL1S("load(feature) requires one or two arguments."));
|
evalError(fL1S("load(feature) requires one or two arguments."));
|
||||||
return ReturnFalse;
|
return ReturnFalse;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user