CppTool: Avoid a use of QStringRef

Change-Id: I2a82bad7d91e059915526f0cf7b89f0d8367463a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-06-15 17:39:32 +02:00
parent 361b80cb9b
commit 328c0cf809
4 changed files with 4 additions and 4 deletions

View File

@@ -195,7 +195,7 @@ void CppHighlighter::highlightBlock(const QString &text)
} else if (tk.isKeyword()
|| (m_languageFeatures.qtKeywordsEnabled
&& CppTools::isQtKeyword(text.midRef(tk.utf16charsBegin(), tk.utf16chars())))
&& CppTools::isQtKeyword(QStringView{text}.mid(tk.utf16charsBegin(), tk.utf16chars())))
|| (m_languageFeatures.objCEnabled && tk.isObjCAtKeyword())) {
setFormat(tk.utf16charsBegin(), tk.utf16chars(), formatForCategory(C_KEYWORD));
} else if (tk.isPrimitiveType()) {