forked from qt-creator/qt-creator
Use QString::*Ref method
Change-Id: I63a10f274dd17e08b5b8a2577762cc9f7960b5af Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Laurent Montel
parent
384d141aac
commit
158ab3316e
@@ -306,7 +306,7 @@ QList<Diff> Differ::moveWhitespaceIntoEqualities(const QList<Diff> &input)
|
||||
}
|
||||
if (j > 0) {
|
||||
// diff starts with j whitespaces, move them to the previous diff
|
||||
previousDiff.text.append(diff.text.left(j));
|
||||
previousDiff.text.append(diff.text.leftRef(j));
|
||||
diff.text = diff.text.mid(j);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ QString SideDiffEditorWidget::plainTextFromSelection(const QTextCursor &cursor)
|
||||
if (textInserted)
|
||||
text += QLatin1Char('\n');
|
||||
if (block == endBlock)
|
||||
text += block.text().left(endPosition - block.position());
|
||||
text += block.text().leftRef(endPosition - block.position());
|
||||
else
|
||||
text += block.text();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user