forked from qt-creator/qt-creator
TextEditor: Fix build with Qt6
Adapt to QStringRef and QAbstractItemView::viewOptions() removal Task-number: QTCREATORBUG-24098 Change-Id: Ia2d446312f68bd60143796284d31f5bba56aa0ed Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -3745,7 +3745,7 @@ QString TextEditorWidgetPrivate::copyBlockSelection()
|
||||
selection += QString(-startOffset, QLatin1Char(' '));
|
||||
if (endOffset < 0)
|
||||
--endPos;
|
||||
selection += text.midRef(startPos, endPos - startPos);
|
||||
selection += text.mid(startPos, endPos - startPos);
|
||||
if (endOffset < 0)
|
||||
selection += QString(ts.m_tabSize + endOffset, QLatin1Char(' '));
|
||||
else if (endOffset > 0)
|
||||
@@ -4622,10 +4622,10 @@ void TextEditorWidgetPrivate::paintReplacement(PaintEventData &data, QPainter &p
|
||||
if (right.endsWith(QLatin1Char(';'))) {
|
||||
right.chop(1);
|
||||
right = right.trimmed();
|
||||
replacement.append(right.rightRef(right.endsWith('/') ? 2 : 1));
|
||||
replacement.append(right.right(right.endsWith('/') ? 2 : 1));
|
||||
replacement.append(QLatin1Char(';'));
|
||||
} else {
|
||||
replacement.append(right.rightRef(right.endsWith('/') ? 2 : 1));
|
||||
replacement.append(right.right(right.endsWith('/') ? 2 : 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user