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
@@ -3280,7 +3280,7 @@ QString TextEditorWidgetPrivate::copyBlockSelection()
|
||||
selection += QString(-startOffset, QLatin1Char(' '));
|
||||
if (endOffset < 0)
|
||||
--endPos;
|
||||
selection += text.mid(startPos, endPos - startPos);
|
||||
selection += text.midRef(startPos, endPos - startPos);
|
||||
if (endOffset < 0)
|
||||
selection += QString(ts.m_tabSize + endOffset, QLatin1Char(' '));
|
||||
else if (endOffset > 0)
|
||||
@@ -4187,10 +4187,10 @@ void TextEditorWidget::paintEvent(QPaintEvent *e)
|
||||
if (right.endsWith(QLatin1Char(';'))) {
|
||||
right.chop(1);
|
||||
right = right.trimmed();
|
||||
replacement.append(right.right(right.endsWith(QLatin1Char('/')) ? 2 : 1));
|
||||
replacement.append(right.rightRef(right.endsWith('/') ? 2 : 1));
|
||||
replacement.append(QLatin1Char(';'));
|
||||
} else {
|
||||
replacement.append(right.right(right.endsWith(QLatin1Char('/')) ? 2 : 1));
|
||||
replacement.append(right.rightRef(right.endsWith('/') ? 2 : 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user