diff options
author | hjk <hjk@qt.io> | 2020-06-15 17:39:32 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2020-06-16 11:57:07 +0000 |
commit | 328c0cf809a437a9875e485d2da12a2da22cd11b (patch) | |
tree | 31ec25b0cf585e4420ca234bb06a9c5b946609a5 /src/plugins/cppeditor | |
parent | 361b80cb9b3f4d3cb2d10df5d4e8f3a46447b17b (diff) | |
download | qt-creator-328c0cf809a437a9875e485d2da12a2da22cd11b.tar.gz |
CppTool: Avoid a use of QStringRef
Change-Id: I2a82bad7d91e059915526f0cf7b89f0d8367463a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/cppeditor')
-rw-r--r-- | src/plugins/cppeditor/cpphighlighter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cpphighlighter.cpp b/src/plugins/cppeditor/cpphighlighter.cpp index d862ea3c2c..6cfa94ee52 100644 --- a/src/plugins/cppeditor/cpphighlighter.cpp +++ b/src/plugins/cppeditor/cpphighlighter.cpp @@ -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()) { |