Do not pass QStringView by const reference

That's what the documentation says:

  https://doc.qt.io/qt-6/qstringview.html#details

Change-Id: I0b41fc4abad1601c0ed416a505534cf7ae7633e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Kai Köhne
2021-06-15 20:25:49 +02:00
committed by Kai Koehne
parent 4bfcea22bf
commit bf04c98c1c
22 changed files with 68 additions and 68 deletions

View File

@@ -454,7 +454,7 @@ bool ClangCompletionAssistProcessor::accepts() const
&& tokens.at(1).kind() == T_IDENTIFIER) {
const QString &line = tc.block().text();
const Token &idToken = tokens.at(1);
const QStringView &identifier = Utils::midView(line,
QStringView identifier = Utils::midView(line,
idToken.utf16charsBegin(),
idToken.utf16chars());
if (identifier == QLatin1String("include")