forked from qt-creator/qt-creator
Preferably use QStringRef::toInt().
Avoid allocations for converting to int. Change-Id: Id8c79334f4809ec075ffe7e6b7635be4873eafd8 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -318,7 +318,7 @@ QList<int> AndroidToolChainFactory::versionNumberFromString(const QString &versi
|
||||
index = end;
|
||||
|
||||
bool ok;
|
||||
int v = version.mid(start, index - start).toInt(&ok);
|
||||
int v = version.midRef(start, index - start).toInt(&ok);
|
||||
if (!ok) // unparseable, return what we have
|
||||
return result;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user