forked from qt-creator/qt-creator
CppTools: Fix QStringRef and QSharedPointer related issues with Qt6
Task-number: QTCREATORBUG-24098 Change-Id: I97347ac3fb397fea8eee655e3cc4ee252c511885 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -87,7 +87,9 @@ Tokens SimpleLexer::operator()(const QString &text, int state)
|
||||
break;
|
||||
}
|
||||
|
||||
QStringRef spell = text.midRef(tk.bytesBegin(), tk.bytes());
|
||||
const QStringView spell = tk.bytesBegin() + tk.bytes() > text.size()
|
||||
? QStringView(text).mid(tk.bytesBegin())
|
||||
: QStringView(text).mid(tk.bytesBegin(), tk.bytes());
|
||||
lex.setScanAngleStringLiteralTokens(false);
|
||||
|
||||
if (tk.newline() && tk.is(T_POUND))
|
||||
|
||||
Reference in New Issue
Block a user