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:
Eike Ziller
2020-09-07 14:44:41 +02:00
parent 6b9cad8b05
commit 7aa0b1ea6b
5 changed files with 9 additions and 10 deletions

View File

@@ -176,7 +176,7 @@ static bool textStartsWith(CaseSensitivity cs, const QString &text, const QStrin
return text.startsWith(prefix, Qt::CaseSensitive);
case TextEditor::FirstLetterCaseSensitive:
return prefix.at(0) == text.at(0)
&& prefix.midRef(1).startsWith(text.midRef(1), Qt::CaseInsensitive);
&& QStringView(prefix).mid(1).startsWith(QStringView(text).mid(1), Qt::CaseInsensitive);
}
return false;