Commit ca1f4a26 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

add ProString::toLongLong() and make use of it

this is just a bit cleaner.

Change-Id: I03e628aca9e2e53c602a4db724da277a0e2c2486
Reviewed-by: Joerg Bornemann's avatarJoerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/e6b755e702fd6d8ebeb25ecd7a5059e62da6c971)
Reviewed-by: Jake Petroules's avatarJake Petroules <jake.petroules@qt.io>
parent c4382290
......@@ -126,6 +126,7 @@ public:
bool contains(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return indexOf(s, 0, cs) >= 0; }
bool contains(const char *s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return indexOf(QLatin1String(s), 0, cs) >= 0; }
bool contains(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const { return indexOf(c, 0, cs) >= 0; }
int toLongLong(bool *ok = 0, int base = 10) const { return toQStringRef().toLongLong(ok, base); }
int toInt(bool *ok = 0, int base = 10) const { return toQStringRef().toInt(ok, base); }
short toShort(bool *ok = 0, int base = 10) const { return toQStringRef().toShort(ok, base); }
......
......@@ -567,7 +567,7 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand(
break;
}
bool ok;
qlonglong num = m_tmp3.toLongLong(&ok, ibase);
qlonglong num = args.at(0).toLongLong(&ok, ibase);
if (!ok) {
evalError(fL1S("format_number(): malformed number %2 for base %1.")
.arg(ibase).arg(m_tmp3));
......
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