forked from qt-creator/qt-creator
Fix warning: "Use midRef() instead of mid()"
[-Wclazy-qstring-ref] Change-Id: If8a0844b39377feb3772542559655854a92b93cd Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -159,8 +159,8 @@ static QString sanitizeBlameOutput(const QString &b)
|
||||
forever {
|
||||
QTC_CHECK(prevPos < pos);
|
||||
int afterParen = prevPos + parenPos;
|
||||
result.append(b.mid(prevPos, stripPos));
|
||||
result.append(b.mid(afterParen, pos - afterParen));
|
||||
result.append(b.midRef(prevPos, stripPos));
|
||||
result.append(b.midRef(afterParen, pos - afterParen));
|
||||
prevPos = pos;
|
||||
QTC_CHECK(prevPos != 0);
|
||||
if (pos == b.size())
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
filePath.remove(0, m_ref.length());
|
||||
single.fileName = m_directory + '/' + filePath;
|
||||
const int textSeparator = line.indexOf(QChar::Null, lineSeparator + 1);
|
||||
single.lineNumber = line.mid(lineSeparator + 1, textSeparator - lineSeparator - 1).toInt();
|
||||
single.lineNumber = line.midRef(lineSeparator + 1, textSeparator - lineSeparator - 1).toInt();
|
||||
QString text = line.mid(textSeparator + 1);
|
||||
QRegularExpression regexp;
|
||||
QVector<Match> matches;
|
||||
|
||||
Reference in New Issue
Block a user