Commit 5da27482 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

remove pointless conversions to QString when converting to int

this doesn't change a lot, but is cleaner.

Change-Id: Ia89c399d6df7cc6264954cf309d2c971a5592d6b
Reviewed-by: Joerg Bornemann's avatarJoerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/a7a3cd643a554c717ad8fb2bdad3e941dfd94cec)
Reviewed-by: Jake Petroules's avatarJake Petroules <jake.petroules@qt.io>
parent d549e857
......@@ -484,9 +484,9 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand(
} else {
var = args[0];
sep = args.at(1).toQString();
beg = args.at(2).toQString(m_tmp2).toInt();
beg = args.at(2).toInt();
if (args.count() == 4)
end = args.at(3).toQString(m_tmp2).toInt();
end = args.at(3).toInt();
}
} else {
if (args.count() != 1) {
......@@ -645,7 +645,7 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand(
const ProStringList &var = values(map(args.at(0)));
int start = 0, end = 0;
if (args.count() >= 2) {
const QString &start_str = args.at(1).toQString(m_tmp1);
const ProString &start_str = args.at(1);
start = start_str.toInt(&ok);
if (!ok) {
if (args.count() == 2) {
......@@ -658,11 +658,11 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand(
}
if (!ok)
evalError(fL1S("member() argument 2 (start) '%2' invalid.")
.arg(start_str));
.arg(start_str.toQString(m_tmp1)));
} else {
end = start;
if (args.count() == 3)
end = args.at(2).toQString(m_tmp1).toInt(&ok);
end = args.at(2).toInt(&ok);
if (!ok)
evalError(fL1S("member() argument 3 (end) '%2' invalid.")
.arg(args.at(2).toQString(m_tmp1)));
......@@ -1303,7 +1303,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
return ReturnFalse;
}
int cnt = values(map(args.at(0))).count();
int val = args.at(1).toQString(m_tmp1).toInt();
int val = args.at(1).toInt();
if (args.count() == 3) {
const ProString &comp = args.at(2);
if (comp == QLatin1String(">") || comp == QLatin1String("greaterThan")) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment