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:
@@ -349,7 +349,7 @@ ContextData getLocationContext(TextDocument *document, int lineNumber)
|
||||
if (!fileName.isEmpty()) {
|
||||
// Possibly one of the "27 [1] foo = x" lines
|
||||
int pos = line.indexOf(QLatin1Char('['));
|
||||
int ln = line.left(pos - 1).toInt();
|
||||
int ln = line.leftRef(pos - 1).toInt();
|
||||
if (ln > 0) {
|
||||
data.type = LocationByFile;
|
||||
data.fileName = fileName;
|
||||
|
||||
Reference in New Issue
Block a user